/* target addr and (for multipoint) hub addr/port */
if (musb->is_multipoint) {
musb_writeb(mbase,
- MGC_BUSCTL_OFFSET(epnum, MUSB_TXFUNCADDR),
+ MUSB_BUSCTL_OFFSET(epnum, MUSB_TXFUNCADDR),
qh->addr_reg);
musb_writeb(mbase,
- MGC_BUSCTL_OFFSET(epnum, MUSB_TXHUBADDR),
+ MUSB_BUSCTL_OFFSET(epnum, MUSB_TXHUBADDR),
qh->h_addr_reg);
musb_writeb(mbase,
- MGC_BUSCTL_OFFSET(epnum, MUSB_TXHUBPORT),
+ MUSB_BUSCTL_OFFSET(epnum, MUSB_TXHUBPORT),
qh->h_port_reg);
/* FIXME if !epnum, do the same for RX ... */
} else
musb_readb(regs, MUSB_RXTYPE),
/* FIXME: assumes multipoint */
musb_readb(musb->mregs,
- MGC_BUSCTL_OFFSET(epnum,
+ MUSB_BUSCTL_OFFSET(epnum,
MUSB_RXFUNCADDR)),
musb_readb(musb->mregs,
- MGC_BUSCTL_OFFSET(epnum,
+ MUSB_BUSCTL_OFFSET(epnum,
MUSB_RXHUBADDR)),
musb_readb(musb->mregs,
- MGC_BUSCTL_OFFSET(epnum,
+ MUSB_BUSCTL_OFFSET(epnum,
MUSB_RXHUBPORT))
);
if (code <= 0)
musb_readb(regs, MUSB_TXTYPE),
/* FIXME: assumes multipoint */
musb_readb(musb->mregs,
- MGC_BUSCTL_OFFSET(epnum,
+ MUSB_BUSCTL_OFFSET(epnum,
MUSB_TXFUNCADDR)),
musb_readb(musb->mregs,
- MGC_BUSCTL_OFFSET(epnum,
+ MUSB_BUSCTL_OFFSET(epnum,
MUSB_TXHUBADDR)),
musb_readb(musb->mregs,
- MGC_BUSCTL_OFFSET(epnum,
+ MUSB_BUSCTL_OFFSET(epnum,
MUSB_TXHUBPORT))
);
if (code <= 0)
#if defined(CONFIG_USB_TUSB6010)
#define musb_ep_select(_mbase, _epnum) \
musb_writeb((_mbase), MUSB_INDEX, (_epnum))
-#define MGC_END_OFFSET MGC_TUSB_OFFSET
+#define MGC_END_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 MGC_END_OFFSET MGC_FLAT_OFFSET
+#define MGC_END_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 MGC_END_OFFSET MGC_INDEXED_OFFSET
+#define MGC_END_OFFSET MUSB_INDEXED_OFFSET
#endif
/****************************** FUNCTIONS ********************************/
#define MUSB_CONFIGDATA MUSB_FIFOSIZE /* re-used for EP0 */
/* offsets to endpoint registers in indexed model (using INDEX register) */
-#define MGC_INDEXED_OFFSET(_epnum, _offset) \
+#define MUSB_INDEXED_OFFSET(_epnum, _offset) \
(0x10 + (_offset))
/* offsets to endpoint registers in flat models */
-#define MGC_FLAT_OFFSET(_epnum, _offset) \
+#define MUSB_FLAT_OFFSET(_epnum, _offset) \
(0x100 + (0x10*(_epnum)) + (_offset))
#ifdef CONFIG_USB_TUSB6010
/* TUSB6010 EP0 configuration register is special */
-#define MGC_TUSB_OFFSET(_epnum, _offset) \
+#define MUSB_TUSB_OFFSET(_epnum, _offset) \
(0x10 + _offset)
#include "tusb6010.h" /* needed "only" for TUSB_EP0_CONF */
#endif
#define MUSB_RXHUBADDR 0x06
#define MUSB_RXHUBPORT 0x07
-#define MGC_BUSCTL_OFFSET(_epnum, _offset) \
+#define MUSB_BUSCTL_OFFSET(_epnum, _offset) \
(0x80 + (8*(_epnum)) + (_offset))
/*
hw_ep->regs = MGC_END_OFFSET(i, 0) + mbase;
#ifdef CONFIG_USB_MUSB_HDRC_HCD
- hw_ep->target_regs = MGC_BUSCTL_OFFSET(i, 0) + mbase;
+ hw_ep->target_regs = MUSB_BUSCTL_OFFSET(i, 0) + mbase;
hw_ep->rx_reinit = 1;
hw_ep->tx_reinit = 1;
#endif