More camelcase fixes: remove MGC_WriteCsr16.
This review also caught a latent bug in the GIT tree, where peripheral side
shared fifo OUT endpoints (not used by the standard set of gadget drivers)
would init wrong since they read from the wrong register.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
struct musb_ep *pEnd;
void __iomem *epio = pThis->aLocalEnd[bEnd].regs;
struct usb_request *pRequest;
- void __iomem *pBase = pThis->pRegs;
u16 wFifoCount = 0, wCsrVal;
int use_dma = 0;
| MGC_M_TXCSR_MODE);
wCsrVal &= ~MGC_M_TXCSR_P_UNDERRUN;
- MGC_WriteCsr16(pBase, MGC_O_HDRC_TXCSR, bEnd,
- wCsrVal);
+ musb_writew(epio, MGC_O_HDRC_TXCSR, wCsrVal);
}
}
| MGC_M_TXCSR_P_UNDERRUN
| MGC_M_TXCSR_TXPKTRDY);
wCsrVal |= MGC_M_TXCSR_MODE | MGC_M_TXCSR_DMAENAB;
- MGC_WriteCsr16(pBase, MGC_O_HDRC_TXCSR, bEnd,
+ musb_writew(epio, MGC_O_HDRC_TXCSR,
(MGC_M_TXCSR_P_WZC_BITS & ~MGC_M_TXCSR_P_UNDERRUN)
| wCsrVal);
pRequest->actual += wFifoCount;
wCsrVal |= MGC_M_TXCSR_TXPKTRDY;
wCsrVal &= ~MGC_M_TXCSR_P_UNDERRUN;
- MGC_WriteCsr16(pBase, MGC_O_HDRC_TXCSR, bEnd, wCsrVal);
+ musb_writew(epio, MGC_O_HDRC_TXCSR, wCsrVal);
}
/* host may already have the data when this message shows... */
if (wCsrVal & MGC_M_TXCSR_P_SENTSTALL) {
wCsrVal |= MGC_M_TXCSR_P_WZC_BITS;
wCsrVal &= ~MGC_M_TXCSR_P_SENTSTALL;
- MGC_WriteCsr16(pBase, MGC_O_HDRC_TXCSR, bEnd, wCsrVal);
+ musb_writew(epio, MGC_O_HDRC_TXCSR, wCsrVal);
if (dma_channel_status(dma) == MGC_DMA_STATUS_BUSY) {
dma->bStatus = MGC_DMA_STATUS_CORE_ABORT;
pThis->pDmaController->channel_abort(dma);
wCsrVal |= MGC_M_TXCSR_P_WZC_BITS;
wCsrVal &= ~(MGC_M_TXCSR_P_UNDERRUN
| MGC_M_TXCSR_TXPKTRDY);
- MGC_WriteCsr16(pBase, MGC_O_HDRC_TXCSR, bEnd, wCsrVal);
+ musb_writew(epio, MGC_O_HDRC_TXCSR, wCsrVal);
DBG(20, "underrun on ep%d, req %p\n", bEnd, pRequest);
}
wCsrVal &= ~(MGC_M_TXCSR_DMAENAB
| MGC_M_TXCSR_P_UNDERRUN
| MGC_M_TXCSR_TXPKTRDY);
- MGC_WriteCsr16(pBase, MGC_O_HDRC_TXCSR, bEnd,
- wCsrVal);
+ musb_writew(epio, MGC_O_HDRC_TXCSR, wCsrVal);
/* ensure writebuffer is empty */
wCsrVal = musb_readw(epio, MGC_O_HDRC_TXCSR);
DBG(4, "TXCSR%d %04x, dma off, "
break;
DBG(4, "sending zero pkt\n");
- MGC_WriteCsr16(pBase, MGC_O_HDRC_TXCSR,
- bEnd,
+ musb_writew(epio, MGC_O_HDRC_TXCSR,
MGC_M_TXCSR_MODE
| MGC_M_TXCSR_TXPKTRDY);
}
u16 wCsrVal = 0;
const u8 bEnd = req->bEnd;
struct usb_request *pRequest = &req->request;
- void __iomem *pBase = pThis->pRegs;
struct musb_ep *pEnd = &pThis->aLocalEnd[bEnd].ep_out;
void __iomem *epio = pThis->aLocalEnd[bEnd].regs;
u16 wFifoCount = 0;
wCsrVal &= ~(MGC_M_RXCSR_AUTOCLEAR
| MGC_M_RXCSR_DMAMODE);
wCsrVal |= MGC_M_RXCSR_DMAENAB | MGC_M_RXCSR_P_WZC_BITS;
- MGC_WriteCsr16(pBase, MGC_O_HDRC_RXCSR, bEnd, wCsrVal);
+ musb_writew(epio, MGC_O_HDRC_RXCSR, wCsrVal);
return;
}
}
disabling MGC_M_RXCSR_DMAMODE) is required
to get DMAReq to activate
*/
- MGC_WriteCsr16(pBase, MGC_O_HDRC_RXCSR, bEnd,
+ musb_writew(epio, MGC_O_HDRC_RXCSR,
wCsrVal | MGC_M_RXCSR_DMAMODE);
#endif
- MGC_WriteCsr16(pBase, MGC_O_HDRC_RXCSR, bEnd,
+ musb_writew(epio, MGC_O_HDRC_RXCSR,
wCsrVal);
if (pRequest->actual < pRequest->length) {
/* ack the read! */
wCsrVal |= MGC_M_RXCSR_P_WZC_BITS;
wCsrVal &= ~MGC_M_RXCSR_RXPKTRDY;
- MGC_WriteCsr16(pBase, MGC_O_HDRC_RXCSR, bEnd, wCsrVal);
+ musb_writew(epio, MGC_O_HDRC_RXCSR, wCsrVal);
}
}
wCsrVal |= MGC_M_RXCSR_P_WZC_BITS;
wCsrVal &= ~MGC_M_RXCSR_P_SENTSTALL;
- MGC_WriteCsr16(pBase, MGC_O_HDRC_RXCSR, bEnd, wCsrVal);
+ musb_writew(epio, MGC_O_HDRC_RXCSR, wCsrVal);
if (pRequest)
musb_g_giveback(pEnd, pRequest, -EPIPE);
if (wCsrVal & MGC_M_RXCSR_P_OVERRUN) {
// wCsrVal |= MGC_M_RXCSR_P_WZC_BITS;
wCsrVal &= ~MGC_M_RXCSR_P_OVERRUN;
- MGC_WriteCsr16(pBase, MGC_O_HDRC_RXCSR, bEnd, wCsrVal);
+ musb_writew(epio, MGC_O_HDRC_RXCSR, wCsrVal);
DBG(3, "%s iso overrun on %p\n", pEnd->name, pRequest);
if (pRequest && pRequest->status == -EINPROGRESS)
wCsrVal &= ~(MGC_M_RXCSR_AUTOCLEAR
| MGC_M_RXCSR_DMAENAB
| MGC_M_RXCSR_DMAMODE);
- MGC_WriteCsr16(pBase, MGC_O_HDRC_RXCSR, bEnd,
+ musb_writew(epio, MGC_O_HDRC_RXCSR,
MGC_M_RXCSR_P_WZC_BITS | wCsrVal);
pRequest->actual += pEnd->dma->dwActualLength;
& (pEnd->wPacketSize - 1))) {
/* ack the read! */
wCsrVal &= ~MGC_M_RXCSR_RXPKTRDY;
- MGC_WriteCsr16(pBase, MGC_O_HDRC_RXCSR, bEnd, wCsrVal);
+ musb_writew(epio, MGC_O_HDRC_RXCSR, wCsrVal);
}
/* incomplete, and not short? wait for next IN packet */
/* REVISIT if can_bulk_combine() use by updating "tmp"
* likewise high bandwidth periodic rx
*/
- MGC_WriteCsr16(pBase, MGC_O_HDRC_RXMAXP, bEnd, tmp);
+ musb_writew(regs, MGC_O_HDRC_RXMAXP, tmp);
/* force shared fifo to OUT-only mode */
if (hw_ep->bIsSharedFifo) {
- csr = musb_readw(pBase, MGC_O_HDRC_TXCSR);
+ csr = musb_readw(regs, MGC_O_HDRC_TXCSR);
csr &= ~(MGC_M_TXCSR_MODE | MGC_M_TXCSR_TXPKTRDY);
- MGC_WriteCsr16(pBase, MGC_O_HDRC_TXCSR, bEnd, csr);
+ musb_writew(regs, MGC_O_HDRC_TXCSR, csr);
}
csr = MGC_M_RXCSR_FLUSHFIFO | MGC_M_RXCSR_CLRDATATOG;
csr |= MGC_M_RXCSR_DISNYET;
/* set twice in case of double buffering */
- MGC_WriteCsr16(pBase, MGC_O_HDRC_RXCSR, bEnd, csr);
- MGC_WriteCsr16(pBase, MGC_O_HDRC_RXCSR, bEnd, csr);
+ musb_writew(regs, MGC_O_HDRC_RXCSR, csr);
+ musb_writew(regs, MGC_O_HDRC_RXCSR, csr);
}
/* NOTE: all the I/O code _should_ work fine without DMA, in case
struct musb *pThis;
u8 bEnd;
struct musb_ep *pEnd;
+ void __iomem *epio;
int status = 0;
pEnd = to_musb_ep(ep);
pThis = pEnd->pThis;
bEnd = pEnd->bEndNumber;
+ epio = pThis->aLocalEnd[bEnd].regs;
spin_lock_irqsave(&pThis->Lock, flags);
MGC_SelectEnd(pThis->pRegs, bEnd);
u16 wIntrTxE = musb_readw(pThis->pRegs, MGC_O_HDRC_INTRTXE);
wIntrTxE &= ~(1 << bEnd);
musb_writew(pThis->pRegs, MGC_O_HDRC_INTRTXE, wIntrTxE);
- MGC_WriteCsr16(pThis->pRegs, MGC_O_HDRC_TXMAXP, bEnd, 0);
+ musb_writew(epio, MGC_O_HDRC_TXMAXP, 0);
} else {
u16 wIntrRxE = musb_readw(pThis->pRegs, MGC_O_HDRC_INTRRXE);
wIntrRxE &= ~(1 << bEnd);
musb_writew(pThis->pRegs, MGC_O_HDRC_INTRRXE, wIntrRxE);
- MGC_WriteCsr16(pThis->pRegs, MGC_O_HDRC_RXMAXP, bEnd, 0);
+ musb_writew(epio, MGC_O_HDRC_RXMAXP, 0);
}
pEnd->desc = NULL;
wCsr &= ~(MGC_M_TXCSR_P_SENDSTALL
| MGC_M_TXCSR_P_SENTSTALL);
wCsr &= ~MGC_M_TXCSR_TXPKTRDY;
- MGC_WriteCsr16(pBase, MGC_O_HDRC_TXCSR, bEnd, wCsr);
+ musb_writew(epio, MGC_O_HDRC_TXCSR, wCsr);
} else {
wCsr = musb_readw(epio, MGC_O_HDRC_RXCSR);
wCsr |= MGC_M_RXCSR_P_WZC_BITS
else
wCsr &= ~(MGC_M_RXCSR_P_SENDSTALL
| MGC_M_RXCSR_P_SENTSTALL);
- MGC_WriteCsr16(pBase, MGC_O_HDRC_RXCSR, bEnd, wCsr);
+ musb_writew(epio, MGC_O_HDRC_RXCSR, wCsr);
}
done:
wCsr = musb_readw(epio, MGC_O_HDRC_TXCSR);
if (wCsr & MGC_M_TXCSR_FIFONOTEMPTY) {
wCsr |= MGC_M_TXCSR_FLUSHFIFO | MGC_M_TXCSR_P_WZC_BITS;
- MGC_WriteCsr16(mbase, MGC_O_HDRC_TXCSR, nEnd, wCsr);
+ musb_writew(epio, MGC_O_HDRC_TXCSR, wCsr);
/* REVISIT may be inappropriate w/o FIFONOTEMPTY ... */
- MGC_WriteCsr16(mbase, MGC_O_HDRC_TXCSR, nEnd, wCsr);
+ musb_writew(epio, MGC_O_HDRC_TXCSR, wCsr);
}
} else {
wCsr = musb_readw(epio, MGC_O_HDRC_RXCSR);
wCsr |= MGC_M_RXCSR_FLUSHFIFO | MGC_M_RXCSR_P_WZC_BITS;
- MGC_WriteCsr16(mbase, MGC_O_HDRC_RXCSR, nEnd, wCsr);
- MGC_WriteCsr16(mbase, MGC_O_HDRC_RXCSR, nEnd, wCsr);
+ musb_writew(epio, MGC_O_HDRC_RXCSR, wCsr);
+ musb_writew(epio, MGC_O_HDRC_RXCSR, wCsr);
}
/* re-enable interrupt */
u8 bDone = FALSE;
u32 length;
int do_flush = 0;
- void __iomem *pBase = pThis->pRegs;
struct musb_hw_ep *pEnd = pThis->aLocalEnd + bEnd;
void __iomem *epio = pEnd->regs;
struct musb_qh *qh = pEnd->in_qh;
wCsr &= ~(MGC_M_RXCSR_RXPKTRDY | MGC_M_RXCSR_H_REQPKT);
if (!bDone)
wCsr |= MGC_M_RXCSR_H_REQPKT;
- MGC_WriteCsr16(pBase, MGC_O_HDRC_RXCSR, bEnd, wCsr);
+ musb_writew(epio, MGC_O_HDRC_RXCSR, wCsr);
}
return bDone;
csr |= MGC_M_TXCSR_CLRDATATOG;
/* twice in case of double packet buffering */
- MGC_WriteCsr16(pBase, MGC_O_HDRC_TXCSR, bEnd,
- csr);
+ musb_writew(epio, MGC_O_HDRC_TXCSR, csr);
/* REVISIT may need to clear FLUSHFIFO ... */
- MGC_WriteCsr16(pBase, MGC_O_HDRC_TXCSR, bEnd,
- csr);
+ musb_writew(epio, MGC_O_HDRC_TXCSR, csr);
wCsr = musb_readw(epio, MGC_O_HDRC_TXCSR);
} else {
/* endpoint 0: just flush */
- MGC_WriteCsr16(pBase, MGC_O_HDRC_CSR0, bEnd,
+ musb_writew(epio, MGC_O_HDRC_CSR0,
wCsr | MGC_M_CSR0_FLUSHFIFO);
- MGC_WriteCsr16(pBase, MGC_O_HDRC_CSR0, bEnd,
+ musb_writew(epio, MGC_O_HDRC_CSR0,
wCsr | MGC_M_CSR0_FLUSHFIFO);
}
if (bEnd) {
musb_writeb(epio, MGC_O_HDRC_TXTYPE, qh->type_reg);
if (can_bulk_split(pThis, qh->type))
- MGC_WriteCsr16(pBase, MGC_O_HDRC_TXMAXP, bEnd,
+ musb_writew(epio, MGC_O_HDRC_TXMAXP,
wPacketSize
| ((pEnd->wMaxPacketSizeTx /
wPacketSize) - 1) << 11);
else
- MGC_WriteCsr16(pBase, MGC_O_HDRC_TXMAXP, bEnd,
+ musb_writew(epio, MGC_O_HDRC_TXMAXP,
wPacketSize);
musb_writeb(epio, MGC_O_HDRC_TXINTERVAL, qh->intv_reg);
} else {
| MGC_M_TXCSR_DMAMODE
| MGC_M_TXCSR_DMAENAB);
wCsr |= MGC_M_TXCSR_MODE;
- MGC_WriteCsr16(pBase, MGC_O_HDRC_TXCSR, bEnd,
+ musb_writew(epio, MGC_O_HDRC_TXCSR,
wCsr | MGC_M_TXCSR_MODE);
qh->segsize = min(dwLength, pDmaChannel->dwMaxLength);
| MGC_M_TXCSR_DMAENAB
| MGC_M_TXCSR_DMAMODE);
- MGC_WriteCsr16(pBase, MGC_O_HDRC_TXCSR, bEnd, wCsr);
+ musb_writew(epio, MGC_O_HDRC_TXCSR, wCsr);
bDmaOk = pDmaController->channel_program(
pDmaChannel, wPacketSize,
| MGC_M_TXCSR_DMAMODE
| MGC_M_TXCSR_DMAENAB);
wCsr |= MGC_M_TXCSR_MODE;
- MGC_WriteCsr16(pBase, MGC_O_HDRC_TXCSR, bEnd,
+ musb_writew(epio, MGC_O_HDRC_TXCSR,
wCsr | MGC_M_TXCSR_MODE);
pDmaChannel->dwActualLength = 0L;
wCsr |= MGC_M_TXCSR_MODE;
if (bEnd)
- MGC_WriteCsr16(pBase, MGC_O_HDRC_TXCSR,
- bEnd, wCsr);
-
+ musb_writew(epio, MGC_O_HDRC_TXCSR, wCsr);
}
/* re-enable interrupt */
* if (qh->ring.next != &musb->control), then
* we have a candidate... NAKing is *NOT* an error
*/
- MGC_WriteCsr16(pBase, MGC_O_HDRC_CSR0, 0, 0);
+ musb_writew(epio, MGC_O_HDRC_CSR0, 0);
retval = IRQ_HANDLED;
}
/* use the proper sequence to abort the transfer */
if (wCsrVal & MGC_M_CSR0_H_REQPKT) {
wCsrVal &= ~MGC_M_CSR0_H_REQPKT;
- MGC_WriteCsr16(pBase, MGC_O_HDRC_CSR0, 0, wCsrVal);
+ musb_writew(epio, MGC_O_HDRC_CSR0, wCsrVal);
wCsrVal &= ~MGC_M_CSR0_H_NAKTIMEOUT;
- MGC_WriteCsr16(pBase, MGC_O_HDRC_CSR0, 0, wCsrVal);
+ musb_writew(epio, MGC_O_HDRC_CSR0, wCsrVal);
} else {
wCsrVal |= MGC_M_CSR0_FLUSHFIFO;
- MGC_WriteCsr16(pBase, MGC_O_HDRC_CSR0, 0, wCsrVal);
- MGC_WriteCsr16(pBase, MGC_O_HDRC_CSR0, 0, wCsrVal);
+ musb_writew(epio, MGC_O_HDRC_CSR0, wCsrVal);
+ musb_writew(epio, MGC_O_HDRC_CSR0, wCsrVal);
wCsrVal &= ~MGC_M_CSR0_H_NAKTIMEOUT;
- MGC_WriteCsr16(pBase, MGC_O_HDRC_CSR0, 0, wCsrVal);
+ musb_writew(epio, MGC_O_HDRC_CSR0, wCsrVal);
}
musb_writeb(epio, MGC_O_HDRC_NAKLIMIT0, 0);
/* clear it */
- MGC_WriteCsr16(pBase, MGC_O_HDRC_CSR0, 0, 0);
+ musb_writew(epio, MGC_O_HDRC_CSR0, 0);
}
if (unlikely(!pUrb)) {
* SHOULD NEVER HAPPEN! */
ERR("no URB for end 0\n");
- MGC_WriteCsr16(pBase, MGC_O_HDRC_CSR0, 0, MGC_M_CSR0_FLUSHFIFO);
- MGC_WriteCsr16(pBase, MGC_O_HDRC_CSR0, 0, MGC_M_CSR0_FLUSHFIFO);
- MGC_WriteCsr16(pBase, MGC_O_HDRC_CSR0, 0, 0);
+ musb_writew(epio, MGC_O_HDRC_CSR0, MGC_M_CSR0_FLUSHFIFO);
+ musb_writew(epio, MGC_O_HDRC_CSR0, MGC_M_CSR0_FLUSHFIFO);
+ musb_writew(epio, MGC_O_HDRC_CSR0, 0);
goto done;
}
DBG(5, "ep0 STATUS, csr %04x\n", wCsrVal);
}
- MGC_WriteCsr16(pBase, MGC_O_HDRC_CSR0, 0, wCsrVal);
+ musb_writew(epio, MGC_O_HDRC_CSR0, wCsrVal);
retval = IRQ_HANDLED;
}
* we have a candidate... NAKing is *NOT* an error
*/
MGC_SelectEnd(pBase, bEnd);
- MGC_WriteCsr16(pBase, MGC_O_HDRC_CSR0, 0,
+ musb_writew(epio, MGC_O_HDRC_CSR0,
MGC_M_TXCSR_H_WZC_BITS
| MGC_M_TXCSR_TXPKTRDY);
goto finish;
);
MGC_SelectEnd(pBase, bEnd);
- MGC_WriteCsr16(pBase, MGC_O_HDRC_TXCSR, bEnd, wTxCsrVal);
+ musb_writew(epio, MGC_O_HDRC_TXCSR, wTxCsrVal);
/* REVISIT may need to clear FLUSHFIFO ... */
- MGC_WriteCsr16(pBase, MGC_O_HDRC_TXCSR, bEnd, wTxCsrVal);
+ musb_writew(epio, MGC_O_HDRC_TXCSR, wTxCsrVal);
musb_writeb(epio, MGC_O_HDRC_TXINTERVAL, 0);
bDone = TRUE;
& (qh->maxpacket - 1))) {
/* Send out the packet first ... */
MGC_SelectEnd(pBase, bEnd);
- MGC_WriteCsr16(pBase, MGC_O_HDRC_TXCSR, bEnd,
+ musb_writew(epio, MGC_O_HDRC_TXCSR,
MGC_M_TXCSR_TXPKTRDY);
}
#endif
qh->segsize = wLength;
MGC_SelectEnd(pBase, bEnd);
- MGC_WriteCsr16(pBase, MGC_O_HDRC_TXCSR, bEnd,
+ musb_writew(epio, MGC_O_HDRC_TXCSR,
MGC_M_TXCSR_H_WZC_BITS | MGC_M_TXCSR_TXPKTRDY);
} else
DBG(1, "not complete, but dma enabled?\n");
*/
DBG(6, "RX end %d NAK timeout\n", bEnd);
MGC_SelectEnd(pBase, bEnd);
- MGC_WriteCsr16(pBase, MGC_O_HDRC_RXCSR, bEnd,
+ musb_writew(epio, MGC_O_HDRC_RXCSR,
MGC_M_RXCSR_H_WZC_BITS
| MGC_M_RXCSR_H_REQPKT);
wRxCsrVal &= ~MGC_M_RXCSR_H_REQPKT;
MGC_SelectEnd(pBase, bEnd);
- MGC_WriteCsr16(pBase, MGC_O_HDRC_RXCSR, bEnd,
+ musb_writew(epio, MGC_O_HDRC_RXCSR,
MGC_M_RXCSR_H_WZC_BITS | wRxCsrVal);
}
#endif
/* send IN token for next packet, without AUTOREQ */
if (!bDone) {
wVal |= MGC_M_RXCSR_H_REQPKT;
- MGC_WriteCsr16(pBase, MGC_O_HDRC_RXCSR, bEnd,
+ musb_writew(epio, MGC_O_HDRC_RXCSR,
MGC_M_RXCSR_H_WZC_BITS | wVal);
}
/* do the proper sequence to abort the transfer */
MGC_SelectEnd(pBase, bEnd);
wVal &= ~MGC_M_RXCSR_H_REQPKT;
- MGC_WriteCsr16(pBase, MGC_O_HDRC_RXCSR, bEnd, wVal);
+ musb_writew(epio, MGC_O_HDRC_RXCSR, wVal);
goto finish;
}
wVal |= MGC_M_RXCSR_H_AUTOREQ;
wVal |= MGC_M_RXCSR_AUTOCLEAR | MGC_M_RXCSR_DMAENAB;
- MGC_WriteCsr16(pBase, MGC_O_HDRC_RXCSR, bEnd,
+ musb_writew(epio, MGC_O_HDRC_RXCSR,
MGC_M_RXCSR_H_WZC_BITS | wVal);
/* REVISIT if when actual_length != 0,
| MGC_M_TXCSR_H_ERROR
| MGC_M_TXCSR_FIFONOTEMPTY
);
- MGC_WriteCsr16(regs, MGC_O_HDRC_TXCSR, 0, csr);
+ musb_writew(epio, MGC_O_HDRC_TXCSR, csr);
/* REVISIT may need to clear FLUSHFIFO ... */
- MGC_WriteCsr16(regs, MGC_O_HDRC_TXCSR, 0, csr);
+ musb_writew(epio, MGC_O_HDRC_TXCSR, csr);
/* flush cpu writebuffer */
csr = musb_readw(epio, MGC_O_HDRC_TXCSR);
}
*/
#if defined(CONFIG_ARCH_DAVINCI) || defined(CONFIG_ARCH_OMAP243X)
-/* REVISIT "flat" takes about 1% more object code space and can't be very
- * noticeable for speed differences. But for now indexed access seems to
+/* REVISIT indexed access seemed to
* misbehave (on DaVinci) for at least peripheral IN ...
*/
#define MUSB_FLAT_REG
#define MGC_END_OFFSET MGC_INDEXED_OFFSET
#endif
-/* FIXME: replace with musb_readcsr(hw_ep *, REGNAME), etc
- * using hw_ep->regs, for all access except writing INDEX
- */
-#ifdef MUSB_FLAT_REG
-#define MGC_WriteCsr16(_pBase, _bOffset, _bEnd, _bData) \
- musb_writew((_pBase), MGC_END_OFFSET((_bEnd), (_bOffset)), (_bData))
-#else
-#define MGC_WriteCsr16(_pBase, _bOffset, _bEnd, _bData) \
- musb_writew(_pBase, (_bOffset + 0x10), _bData)
-#endif
-
/****************************** FUNCTIONS ********************************/
#define MUSB_HST_MODE(_pthis)\