usb: gadget: dwc3: Add support for DBM (MSM specific) endpoints.
In MSM architecture, the DBM, Device Bus Manager, is a HW module within
the USB3.0 core wrapper, implementing BAM interface support for USB3.0 IP.
The DBM HW unit requires for its operation a special transfer to be
started, with special TRBs structure. These usb requests will operate in
BAM2BAM mode.
This change adds to the dwc3-msm.c driver a support for queuing
a special transfers to endpoints which serve the DBM.
A function driver can now call to msm_ep_config(*ep) with some
endpoint which will serve the DBM. After this, the function
driver can queue a request to this endpoint as usual ep->queue(*ep,*req).
The function driver may need to add a few more parameters in req->udc_priv
field according to the bit mask fields defined in msm_hsudb.h file.
Change-Id: Iad530dabc68414c61d44e9eaef4402f868b2b12f
Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
diff --git a/arch/arm/mach-msm/include/mach/msm_hsusb.h b/arch/arm/mach-msm/include/mach/msm_hsusb.h
index d7ca7a4..3069916 100644
--- a/arch/arm/mach-msm/include/mach/msm_hsusb.h
+++ b/arch/arm/mach-msm/include/mach/msm_hsusb.h
@@ -20,6 +20,8 @@
#include <linux/types.h>
#include <linux/pm_qos_params.h>
+#include <linux/usb/ch9.h>
+#include <linux/usb/gadget.h>
#define PHY_TYPE_MASK 0x0F
#define PHY_TYPE_MODE 0xF0
@@ -200,4 +202,8 @@
struct clk *ebi1_clk;
};
+int msm_ep_config(struct usb_ep *ep);
+int msm_ep_unconfig(struct usb_ep *ep);
+int msm_data_fifo_config(struct usb_ep *ep, u32 addr, u32 size);
+
#endif