usb: gadget: SPS BAM-to-BAM - USB BAM driver

USB BAM driver to support BAM-to-BAM
USB<->Peripheral transactions.

Change-Id: Ib49a41f5dcdccb6f6bff2492fa64ead40f18b870
Signed-off-by: Ofir Cohen <ofirc@codeaurora.org>
This commit is contained in:
Ofir Cohen
2011-12-13 20:10:01 +02:00
parent 08bbf04068
commit c7827e45a3
5 changed files with 317 additions and 0 deletions

View File

@@ -131,6 +131,19 @@ enum usb_chg_type {
USB_ACA_DOCK_CHARGER,
};
/**
* SPS Pipes direction.
*
* USB_TO_PEER_PERIPHERAL USB (as Producer) to other
* peer peripheral.
* PEER_PERIPHERAL_TO_USB Other Peripheral to
* USB (as consumer).
*/
enum usb_bam_pipe_dir {
USB_TO_PEER_PERIPHERAL,
PEER_PERIPHERAL_TO_USB,
};
/**
* struct msm_otg_platform_data - platform device data
* for msm_otg driver.
@@ -258,4 +271,21 @@ struct msm_hsic_host_platform_data {
unsigned hub_reset;
};
struct usb_bam_pipe_connect {
u32 src_phy_addr;
int src_pipe_index;
u32 dst_phy_addr;
int dst_pipe_index;
u32 data_fifo_base_offset;
u32 data_fifo_size;
u32 desc_fifo_base_offset;
u32 desc_fifo_size;
};
struct msm_usb_bam_platform_data {
struct usb_bam_pipe_connect *connections;
unsigned long usb_bam_phy_base;
unsigned long usb_bam_phy_size;
int usb_bam_num_pipes;
};
#endif