Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185287
b: refs/heads/master
c: 1ca9e9c
h: refs/heads/master
i:
  185285: 3de7a67
  185283: b52929e
  185279: 40ad4ac
v: v3
  • Loading branch information
Bryan Wu authored and Greg Kroah-Hartman committed Mar 2, 2010
1 parent 815bca6 commit 3e7a1c6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 565969237ab6e73ce7192684d00d5b890ee308fa
refs/heads/master: 1ca9e9ca314c4757409a7f4e9c1f12229a175834
28 changes: 13 additions & 15 deletions trunk/drivers/usb/musb/blackfin.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ void musb_write_fifo(struct musb_hw_ep *hw_ep, u16 len, const u8 *src)
void __iomem *fifo = hw_ep->fifo;
void __iomem *epio = hw_ep->regs;
u8 epnum = hw_ep->epnum;
u16 dma_reg = 0;

prefetch((u8 *)src);

Expand All @@ -42,15 +41,17 @@ void musb_write_fifo(struct musb_hw_ep *hw_ep, u16 len, const u8 *src)
dump_fifo_data(src, len);

if (!ANOMALY_05000380 && epnum != 0) {
flush_dcache_range((unsigned int)src,
(unsigned int)(src + len));
u16 dma_reg;

flush_dcache_range((unsigned long)src,
(unsigned long)(src + len));

/* Setup DMA address register */
dma_reg = (u16) ((u32) src & 0xFFFF);
dma_reg = (u32)src;
bfin_write16(USB_DMA_REG(epnum, USB_DMAx_ADDR_LOW), dma_reg);
SSYNC();

dma_reg = (u16) (((u32) src >> 16) & 0xFFFF);
dma_reg = (u32)src >> 16;
bfin_write16(USB_DMA_REG(epnum, USB_DMAx_ADDR_HIGH), dma_reg);
SSYNC();

Expand Down Expand Up @@ -79,12 +80,9 @@ void musb_write_fifo(struct musb_hw_ep *hw_ep, u16 len, const u8 *src)
SSYNC();

if (unlikely((unsigned long)src & 0x01))
outsw_8((unsigned long)fifo, src,
len & 0x01 ? (len >> 1) + 1 : len >> 1);
outsw_8((unsigned long)fifo, src, (len + 1) >> 1);
else
outsw((unsigned long)fifo, src,
len & 0x01 ? (len >> 1) + 1 : len >> 1);

outsw((unsigned long)fifo, src, (len + 1) >> 1);
}
}
/*
Expand All @@ -94,19 +92,19 @@ void musb_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *dst)
{
void __iomem *fifo = hw_ep->fifo;
u8 epnum = hw_ep->epnum;
u16 dma_reg = 0;

if (ANOMALY_05000467 && epnum != 0) {
u16 dma_reg;

invalidate_dcache_range((unsigned int)dst,
(unsigned int)(dst + len));
invalidate_dcache_range((unsigned long)dst,
(unsigned long)(dst + len));

/* Setup DMA address register */
dma_reg = (u16) ((u32) dst & 0xFFFF);
dma_reg = (u32)dst;
bfin_write16(USB_DMA_REG(epnum, USB_DMAx_ADDR_LOW), dma_reg);
SSYNC();

dma_reg = (u16) (((u32) dst >> 16) & 0xFFFF);
dma_reg = (u32)dst >> 16;
bfin_write16(USB_DMA_REG(epnum, USB_DMAx_ADDR_HIGH), dma_reg);
SSYNC();

Expand Down

0 comments on commit 3e7a1c6

Please sign in to comment.