static void musb_ep_program(struct musb *musb, u8 epnum,
struct urb *urb, unsigned int nOut,
- u8 * pBuffer, u32 dwLength);
+ u8 * buf, u32 dwLength);
/*
* Clear TX fifo. Needed to avoid BABBLE errors.
{
u16 wFrame;
u32 dwLength;
- void *pBuffer;
+ void *buf;
void __iomem *mbase = musb->mregs;
struct urb *urb = next_urb(qh);
struct musb_hw_ep *hw_ep = qh->hw_ep;
is_in = 0;
hw_ep->out_qh = qh;
musb->ep0_stage = MGC_END0_START;
- pBuffer = urb->setup_packet;
+ buf = urb->setup_packet;
dwLength = 8;
break;
case USB_ENDPOINT_XFER_ISOC:
qh->iso_idx = 0;
qh->frame = 0;
- pBuffer = urb->transfer_buffer + urb->iso_frame_desc[0].offset;
+ buf = urb->transfer_buffer + urb->iso_frame_desc[0].offset;
dwLength = urb->iso_frame_desc[0].length;
break;
default: /* bulk, interrupt */
- pBuffer = urb->transfer_buffer;
+ buf = urb->transfer_buffer;
dwLength = urb->transfer_buffer_length;
}
case USB_ENDPOINT_XFER_ISOC: s = "-iso"; break;
default: s = "-intr"; break;
}; s;}),
- epnum, pBuffer, dwLength);
+ epnum, buf, dwLength);
/* Configure endpoint */
if (is_in || hw_ep->is_shared_fifo)
hw_ep->in_qh = qh;
else
hw_ep->out_qh = qh;
- musb_ep_program(musb, epnum, urb, !is_in, pBuffer, dwLength);
+ musb_ep_program(musb, epnum, urb, !is_in, buf, dwLength);
/* transmit may have more work: start it when it is time */
if (is_in)
u8 epnum, u8 bIsochError)
{
u16 wRxCount;
- u8 *pBuffer;
+ u8 *buf;
u16 csr;
u8 bDone = FALSE;
u32 length;
}
d = urb->iso_frame_desc + qh->iso_idx;
- pBuffer = buffer + d->offset;
+ buf = buffer + d->offset;
length = d->length;
if (wRxCount > length) {
if (status == 0) {
bDone = (++qh->iso_idx >= urb->number_of_packets);
} else {
/* non-isoch */
- pBuffer = buffer + qh->offset;
+ buf = buffer + qh->offset;
length = urb->transfer_buffer_length - qh->offset;
if (wRxCount > length) {
if (urb->status == -EINPROGRESS)
urb->status = -EREMOTEIO;
}
- musb_read_fifo(hw_ep, length, pBuffer);
+ musb_read_fifo(hw_ep, length, buf);
csr = musb_readw(epio, MUSB_RXCSR);
csr |= MUSB_RXCSR_H_WZC_BITS;
*/
static void musb_ep_program(struct musb *musb, u8 epnum,
struct urb *urb, unsigned int is_out,
- u8 * pBuffer, u32 dwLength)
+ u8 * buf, u32 dwLength)
{
struct dma_controller *dma_controller;
struct dma_channel *pDmaChannel;
/* PIO to load FIFO */
qh->segsize = wLoadCount;
- musb_write_fifo(hw_ep, wLoadCount, pBuffer);
+ musb_write_fifo(hw_ep, wLoadCount, buf);
csr = musb_readw(epio, MUSB_TXCSR);
csr &= ~(MUSB_TXCSR_DMAENAB
| MUSB_TXCSR_DMAMODE
u8 bDone = FALSE;
u16 tx_csr;
size_t wLength = 0;
- u8 *pBuffer = NULL;
+ u8 *buf = NULL;
struct urb *urb;
struct musb_hw_ep *hw_ep = musb->endpoints + epnum;
void __iomem *epio = hw_ep->regs;
bDone = TRUE;
} else if (!dma) {
d++;
- pBuffer = urb->transfer_buffer + d->offset;
+ buf = urb->transfer_buffer + d->offset;
wLength = d->length;
}
} else if (dma) {
& URB_ZERO_PACKET))
bDone = TRUE;
if (!bDone) {
- pBuffer = urb->transfer_buffer
+ buf = urb->transfer_buffer
+ qh->offset;
wLength = urb->transfer_buffer_length
- qh->offset;
musb_advance_schedule(musb, urb, hw_ep, USB_DIR_OUT);
} else if (!(tx_csr & MUSB_TXCSR_DMAENAB)) {
- // WARN_ON(!pBuffer);
+ // WARN_ON(!buf);
/* REVISIT: some docs say that when hw_ep->tx_double_buffered,
* (and presumably, fifo is not half-full) we should write TWO
*/
/* PIO: start next packet in this URB */
wLength = min(qh->maxpacket, (u16) wLength);
- musb_write_fifo(hw_ep, wLength, pBuffer);
+ musb_write_fifo(hw_ep, wLength, buf);
qh->segsize = wLength;
musb_ep_select(mbase, epnum);