浏览代码

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 <bryan.wu@analog.com>
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Bryan Wu 14 年之前
父节点
当前提交
8dd7a23007
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      drivers/usb/musb/musb_hcd.c

+ 5 - 0
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));