Commit 98c841e4 authored by Tony Lindgren's avatar Tony Lindgren

musb_hdrc: Search and replace pDest with dst

Search and replace pDest with dst
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent d4721fa4
...@@ -502,7 +502,7 @@ extern void musb_stop(struct musb *musb); ...@@ -502,7 +502,7 @@ extern void musb_stop(struct musb *musb);
extern void musb_write_fifo(struct musb_hw_ep *ep, extern void musb_write_fifo(struct musb_hw_ep *ep,
u16 wCount, const u8 * src); u16 wCount, const u8 * src);
extern void musb_read_fifo(struct musb_hw_ep *ep, extern void musb_read_fifo(struct musb_hw_ep *ep,
u16 wCount, u8 * pDest); u16 wCount, u8 * dst);
extern void musb_load_testpacket(struct musb *); extern void musb_load_testpacket(struct musb *);
......
...@@ -209,38 +209,38 @@ void musb_write_fifo(struct musb_hw_ep *hw_ep, u16 wCount, const u8 *src) ...@@ -209,38 +209,38 @@ void musb_write_fifo(struct musb_hw_ep *hw_ep, u16 wCount, const u8 *src)
/* /*
* Unload an endpoint's FIFO * Unload an endpoint's FIFO
*/ */
void musb_read_fifo(struct musb_hw_ep *hw_ep, u16 wCount, u8 *pDest) void musb_read_fifo(struct musb_hw_ep *hw_ep, u16 wCount, u8 *dst)
{ {
void __iomem *fifo = hw_ep->fifo; void __iomem *fifo = hw_ep->fifo;
DBG(4, "%cX ep%d fifo %p count %d buf %p\n", DBG(4, "%cX ep%d fifo %p count %d buf %p\n",
'R', hw_ep->bLocalEnd, fifo, wCount, pDest); 'R', hw_ep->bLocalEnd, fifo, wCount, dst);
/* we can't assume unaligned writes work */ /* we can't assume unaligned writes work */
if (likely((0x01 & (unsigned long) pDest) == 0)) { if (likely((0x01 & (unsigned long) dst) == 0)) {
u16 index = 0; u16 index = 0;
/* best case is 32bit-aligned destination address */ /* best case is 32bit-aligned destination address */
if ((0x02 & (unsigned long) pDest) == 0) { if ((0x02 & (unsigned long) dst) == 0) {
if (wCount >= 4) { if (wCount >= 4) {
readsl(fifo, pDest, wCount >> 2); readsl(fifo, dst, wCount >> 2);
index = wCount & ~0x03; index = wCount & ~0x03;
} }
if (wCount & 0x02) { if (wCount & 0x02) {
*(u16*)&pDest[index] = musb_readw(fifo, 0); *(u16*)&dst[index] = musb_readw(fifo, 0);
index += 2; index += 2;
} }
} else { } else {
if (wCount >= 2) { if (wCount >= 2) {
readsw(fifo, pDest, wCount >> 1); readsw(fifo, dst, wCount >> 1);
index = wCount & ~0x01; index = wCount & ~0x01;
} }
} }
if (wCount & 0x01) if (wCount & 0x01)
pDest[index] = musb_readb(fifo, 0); dst[index] = musb_readb(fifo, 0);
} else { } else {
/* byte aligned */ /* byte aligned */
readsb(fifo, pDest, wCount); readsb(fifo, dst, wCount);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment