From: Bryan Wu Date: Mon, 9 Aug 2010 18:57:41 +0000 (-0400) Subject: usb: musb: setup TXCOUNT for Blackfin musb X-Git-Tag: v2010.09-rc2~13 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8dd7a23007ff73dae176aa4628f5c2142d6087dc;p=u-boot usb: musb: setup TXCOUNT for Blackfin musb The Blackfin implementation of musb has a TXCOUNT register that needs to be programmed when transmitting data. Signed-off-by: Bryan Wu Signed-off-by: Cliff Cai Signed-off-by: Mike Frysinger --- diff --git a/drivers/usb/musb/musb_hcd.c b/drivers/usb/musb/musb_hcd.c index dd2aa7f27c..f14e12ffaf 100644 --- a/drivers/usb/musb/musb_hcd.c +++ b/drivers/usb/musb/musb_hcd.c @@ -987,6 +987,11 @@ int submit_bulk_msg(struct usb_device *dev, unsigned long pipe, nextlen = ((len-txlen) < dev->epmaxpacketout[ep]) ? (len-txlen) : dev->epmaxpacketout[ep]; +#ifdef CONFIG_USB_BLACKFIN + /* Set the transfer data size */ + writew(nextlen, &musbr->txcount); +#endif + /* Write the data to the FIFO */ write_fifo(MUSB_BULK_EP, nextlen, (void *)(((u8 *)buffer) + txlen));