struct usb_request *pRequest = next_ep0_request(musb);
u16 wCsrVal = MGC_M_CSR0_TXPKTRDY;
u8 *pFifoSource;
- u8 wFifoCount;
+ u8 fifo_count;
if (!pRequest) {
// WARN_ON(1);
/* load the data */
pFifoSource = (u8 *) pRequest->buf + pRequest->actual;
- wFifoCount = min((unsigned) MGC_END0_FIFOSIZE,
+ fifo_count = min((unsigned) MGC_END0_FIFOSIZE,
pRequest->length - pRequest->actual);
- musb_write_fifo(&musb->aLocalEnd[0], wFifoCount, pFifoSource);
- pRequest->actual += wFifoCount;
+ musb_write_fifo(&musb->aLocalEnd[0], fifo_count, pFifoSource);
+ pRequest->actual += fifo_count;
/* update the flags */
- if (wFifoCount < MUSB_MAX_END0_PACKET
+ if (fifo_count < MUSB_MAX_END0_PACKET
|| pRequest->actual == pRequest->length) {
musb->ep0_state = MGC_END0_STAGE_STATUSOUT;
wCsrVal |= MGC_M_CSR0_P_DATAEND;
struct musb_ep *musb_ep;
void __iomem *epio = musb->aLocalEnd[bEnd].regs;
struct usb_request *pRequest;
- u16 wFifoCount = 0, wCsrVal;
+ u16 fifo_count = 0, wCsrVal;
int use_dma = 0;
musb_ep = req->ep;
wCsrVal = musb_readw(epio, MGC_O_HDRC_TXCSR);
pRequest = &req->request;
- wFifoCount = min(max_ep_writesize(musb, musb_ep),
+ fifo_count = min(max_ep_writesize(musb, musb_ep),
(int)(pRequest->length - pRequest->actual));
if (wCsrVal & MGC_M_TXCSR_TXPKTRDY) {
}
DBG(4, "hw_ep%d, maxpacket %d, fifo count %d, txcsr %03x\n",
- bEnd, musb_ep->wPacketSize, wFifoCount,
+ bEnd, musb_ep->wPacketSize, fifo_count,
wCsrVal);
#ifndef CONFIG_USB_INVENTRA_FIFO
#endif
if (!use_dma) {
- musb_write_fifo(musb_ep->hw_ep, wFifoCount,
+ musb_write_fifo(musb_ep->hw_ep, fifo_count,
(u8 *) (pRequest->buf + pRequest->actual));
- pRequest->actual += wFifoCount;
+ pRequest->actual += fifo_count;
wCsrVal |= MGC_M_TXCSR_TXPKTRDY;
wCsrVal &= ~MGC_M_TXCSR_P_UNDERRUN;
musb_writew(epio, MGC_O_HDRC_TXCSR, wCsrVal);
musb_ep->end_point.name, use_dma ? "dma" : "pio",
pRequest->actual, pRequest->length,
musb_readw(epio, MGC_O_HDRC_TXCSR),
- wFifoCount,
+ fifo_count,
musb_readw(epio, MGC_O_HDRC_TXMAXP));
}
struct usb_request *pRequest = &req->request;
struct musb_ep *musb_ep = &musb->aLocalEnd[bEnd].ep_out;
void __iomem *epio = musb->aLocalEnd[bEnd].regs;
- u16 wFifoCount = 0;
+ u16 fifo_count = 0;
u16 wCount = musb_ep->wPacketSize;
wCsrVal = musb_readw(epio, MGC_O_HDRC_RXCSR);
}
#endif /* Mentor's USB */
- wFifoCount = pRequest->length - pRequest->actual;
+ fifo_count = pRequest->length - pRequest->actual;
DBG(3, "%s OUT/RX pio fifo %d/%d, maxpacket %d\n",
musb_ep->end_point.name,
- wCount, wFifoCount,
+ wCount, fifo_count,
musb_ep->wPacketSize);
- wFifoCount = min(wCount, wFifoCount);
+ fifo_count = min(wCount, fifo_count);
#ifdef CONFIG_USB_TUSB_OMAP_DMA
if (tusb_dma_omap() && musb_ep->dma) {
musb_ep->wPacketSize,
channel->bDesiredMode,
dma_addr,
- wFifoCount);
+ fifo_count);
if (ret == TRUE)
return;
}
#endif
- musb_read_fifo(musb_ep->hw_ep, wFifoCount, (u8 *)
+ musb_read_fifo(musb_ep->hw_ep, fifo_count, (u8 *)
(pRequest->buf + pRequest->actual));
- pRequest->actual += wFifoCount;
+ pRequest->actual += fifo_count;
/* REVISIT if we left anything in the fifo, flush
* it and report -EOVERFLOW
{
int bMore = FALSE;
u8 *pFifoDest = NULL;
- u16 wFifoCount = 0;
+ u16 fifo_count = 0;
struct musb_hw_ep *hw_ep = musb->control_ep;
struct musb_qh *qh = hw_ep->in_qh;
struct usb_ctrlrequest *pRequest;
switch (musb->bEnd0Stage) {
case MGC_END0_IN:
pFifoDest = pUrb->transfer_buffer + pUrb->actual_length;
- wFifoCount = min(wCount, ((u16) (pUrb->transfer_buffer_length
+ fifo_count = min(wCount, ((u16) (pUrb->transfer_buffer_length
- pUrb->actual_length)));
- if (wFifoCount < wCount)
+ if (fifo_count < wCount)
pUrb->status = -EOVERFLOW;
- musb_read_fifo(hw_ep, wFifoCount, pFifoDest);
+ musb_read_fifo(hw_ep, fifo_count, pFifoDest);
- pUrb->actual_length += wFifoCount;
+ pUrb->actual_length += fifo_count;
if (wCount < qh->maxpacket) {
/* always terminate on short read; it's
* rarely reported as an error.
}
/* FALLTHROUGH */
case MGC_END0_OUT:
- wFifoCount = min(qh->maxpacket, ((u16)
+ fifo_count = min(qh->maxpacket, ((u16)
(pUrb->transfer_buffer_length
- pUrb->actual_length)));
- if (wFifoCount) {
+ if (fifo_count) {
pFifoDest = (u8 *) (pUrb->transfer_buffer
+ pUrb->actual_length);
DBG(3, "Sending %d bytes to %p\n",
- wFifoCount, pFifoDest);
- musb_write_fifo(hw_ep, wFifoCount, pFifoDest);
+ fifo_count, pFifoDest);
+ musb_write_fifo(hw_ep, fifo_count, pFifoDest);
- pUrb->actual_length += wFifoCount;
+ pUrb->actual_length += fifo_count;
bMore = TRUE;
}
break;