|
@@ -124,41 +124,6 @@ enum musb_g_ep0_state {
|
|
|
#define OTG_TIME_A_AIDL_BDIS 200 /* min 200 msec */
|
|
|
#define OTG_TIME_B_ASE0_BRST 100 /* min 3.125 ms */
|
|
|
|
|
|
-
|
|
|
-/*************************** REGISTER ACCESS ********************************/
|
|
|
-
|
|
|
-/* Endpoint registers (other than dynfifo setup) can be accessed either
|
|
|
- * directly with the "flat" model, or after setting up an index register.
|
|
|
- */
|
|
|
-
|
|
|
-#if defined(CONFIG_ARCH_DAVINCI) || defined(CONFIG_SOC_OMAP2430) \
|
|
|
- || defined(CONFIG_SOC_OMAP3430) || defined(CONFIG_BLACKFIN) \
|
|
|
- || defined(CONFIG_ARCH_OMAP4)
|
|
|
-/* REVISIT indexed access seemed to
|
|
|
- * misbehave (on DaVinci) for at least peripheral IN ...
|
|
|
- */
|
|
|
-#define MUSB_FLAT_REG
|
|
|
-#endif
|
|
|
-
|
|
|
-/* TUSB mapping: "flat" plus ep0 special cases */
|
|
|
-#if defined(CONFIG_USB_MUSB_TUSB6010) || \
|
|
|
- defined(CONFIG_USB_MUSB_TUSB6010_MODULE)
|
|
|
-#define musb_ep_select(_mbase, _epnum) \
|
|
|
- musb_writeb((_mbase), MUSB_INDEX, (_epnum))
|
|
|
-#define MUSB_EP_OFFSET MUSB_TUSB_OFFSET
|
|
|
-
|
|
|
-/* "flat" mapping: each endpoint has its own i/o address */
|
|
|
-#elif defined(MUSB_FLAT_REG)
|
|
|
-#define musb_ep_select(_mbase, _epnum) (((void)(_mbase)), ((void)(_epnum)))
|
|
|
-#define MUSB_EP_OFFSET MUSB_FLAT_OFFSET
|
|
|
-
|
|
|
-/* "indexed" mapping: INDEX register controls register bank select */
|
|
|
-#else
|
|
|
-#define musb_ep_select(_mbase, _epnum) \
|
|
|
- musb_writeb((_mbase), MUSB_INDEX, (_epnum))
|
|
|
-#define MUSB_EP_OFFSET MUSB_INDEXED_OFFSET
|
|
|
-#endif
|
|
|
-
|
|
|
/****************************** FUNCTIONS ********************************/
|
|
|
|
|
|
#define MUSB_HST_MODE(_musb)\
|
|
@@ -515,7 +480,7 @@ static inline int musb_read_fifosize(struct musb *musb,
|
|
|
u8 reg = 0;
|
|
|
|
|
|
/* read from core using indexed model */
|
|
|
- reg = musb_readb(mbase, MUSB_EP_OFFSET(epnum, MUSB_FIFOSIZE));
|
|
|
+ reg = musb_readb(mbase, musb->io.ep_offset(epnum, MUSB_FIFOSIZE));
|
|
|
/* 0's returned when no more endpoints */
|
|
|
if (!reg)
|
|
|
return -ENODEV;
|