summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/ci13xxx_udc.h
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2011-10-10 16:38:10 (GMT)
committerFelipe Balbi <balbi@ti.com>2011-12-12 09:44:45 (GMT)
commitdd39c358dff41394f20b623fc68be857b6d702ad (patch)
tree138976e023ddff4bfaaed93de6bf9e2e8da02efa /drivers/usb/gadget/ci13xxx_udc.h
parent7bb4fdc602c6cc763185d88f58ed75c84eb32158 (diff)
downloadlinux-fsl-qoriq-dd39c358dff41394f20b623fc68be857b6d702ad.tar.xz
USB: ci13xxx_udc: handle controllers with less than 16 EPs
The ci13xxx_udc driver checks the number of endpoints in the udc controller, however some routines expect that the hardware has 16 bidirectional endpoints. This patch improves the driver to work on controllers with less than 16 endpoints like the udc controller found on freescale's mx23 and mx28. Tested-by: Pavankumar Kondeti <pkondeti@codeaurora.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/ci13xxx_udc.h')
-rw-r--r--drivers/usb/gadget/ci13xxx_udc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/ci13xxx_udc.h b/drivers/usb/gadget/ci13xxx_udc.h
index 2370777..f4871e1 100644
--- a/drivers/usb/gadget/ci13xxx_udc.h
+++ b/drivers/usb/gadget/ci13xxx_udc.h
@@ -127,7 +127,7 @@ struct ci13xxx {
struct ci13xxx_ep ci13xxx_ep[ENDPT_MAX]; /* extended endpts */
u32 ep0_dir; /* ep0 direction */
#define ep0out ci13xxx_ep[0]
-#define ep0in ci13xxx_ep[16]
+#define ep0in ci13xxx_ep[hw_ep_max / 2]
u8 remote_wakeup; /* Is remote wakeup feature
enabled by the host? */
u8 suspended; /* suspended by the host */