>-----Original Message----- >From: Sergei Shtylyov [mailto:sshtylyov@xxxxxxxxxxxxx] >Sent: Tuesday, December 22, 2009 1:04 AM >To: Mike Frysinger >Cc: linux-usb@xxxxxxxxxxxxxxx; Felipe Balbi; >uclinux-dist-devel@xxxxxxxxxxxxxxxxxxxx; Bryan Wu; Cai, Cliff >Subject: Re: [PATCH 2/3] USB: musb: workaround Blackfin FIFO anomalies > >Hello. > >Mike Frysinger wrote: > >> From: Bryan Wu <cooloney@xxxxxxxxxx> >> >> Some of these workarounds are already in place, but labeled as >> affecting all BF52x parts. Since we have official anomaly numbers >> now, use those defines. And since writing to the FIFO has a similar >> hang issue as reading from the FIFO, implement the workaround there >> too when necessary. >> >> Signed-off-by: Bryan Wu <cooloney@xxxxxxxxxx> >> Signed-off-by: Cliff Cai <cliff.cai@xxxxxxxxxx> >> Signed-off-by: Mike Frysinger <vapier@xxxxxxxxxx> >> >[...] >> diff --git a/drivers/usb/musb/blackfin.c >b/drivers/usb/musb/blackfin.c >> index fe4934d..ad26e65 100644 >> --- a/drivers/usb/musb/blackfin.c >> +++ b/drivers/usb/musb/blackfin.c >[...] >> @@ -39,67 +41,113 @@ void musb_write_fifo(struct musb_hw_ep *hw_ep, >> u16 len, const u8 *src) >> >> dump_fifo_data(src, len); >> >> - if (unlikely((unsigned long)src & 0x01)) >> - outsw_8((unsigned long)fifo, src, >> - len & 0x01 ? (len >> 1) + 1 : len >> 1); >> - else >> - outsw((unsigned long)fifo, src, >> - len & 0x01 ? (len >> 1) + 1 : len >> 1); >> -} >> + if (!ANOMALY_05000380 && epnum != 0) { >> + flush_dcache_range((unsigned int)src, >> + (unsigned int)(src + len)); >> + >> + /* Setup DMA address register */ >> + dma_reg = (u16) ((u32) src & 0xFFFF); >> > > Hm, virtual address has the same value as a physical one? On Blackfin,Yes. Blackfin has no mmu,So the virtual address is identical to physical one. Cliff -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html