diff mbox series

[03/13] usb: musb: Always clear the data toggle bit when configuring ep

Message ID 20201129164618.5829-4-pali@kernel.org
State New
Delegated to: Marek Vasut
Headers show
Series Nokia RX-51: Fix USB TTY console and enable it | expand

Commit Message

Pali Rohár Nov. 29, 2020, 4:46 p.m. UTC
Without this patch it was done only when U-Boot was compiled with MUSB Host
Controller. But it is needed also for MUSB Device Controller, otherwise
Device Controller does not work.

Signed-off-by: Pali Rohár <pali@kernel.org>
---
 drivers/usb/musb/musb_core.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Pavel Machek Nov. 29, 2020, 5:52 p.m. UTC | #1
On Sun 2020-11-29 17:46:08, Pali Rohár wrote:
> Without this patch it was done only when U-Boot was compiled with MUSB Host
> Controller. But it is needed also for MUSB Device Controller, otherwise
> Device Controller does not work.
> 
> Signed-off-by: Pali Rohár <pali@kernel.org>

Reviewed-by: Pavel Machek <pavel@ucw.cz>
diff mbox series

Patch

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 147b2eb929..cc6dc3839d 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -81,10 +81,8 @@  void musb_configure_ep(const struct musb_epinfo *epinfo, u8 cnt)
 			config_fifo(tx, idx, fifoaddr);
 
 			csr = readw(&musbr->txcsr);
-#if defined(CONFIG_USB_MUSB_HCD)
 			/* clear the data toggle bit */
 			writew(csr | MUSB_TXCSR_CLRDATATOG, &musbr->txcsr);
-#endif
 			/* Flush fifo if required */
 			if (csr & MUSB_TXCSR_TXPKTRDY)
 				writew(csr | MUSB_TXCSR_FLUSHFIFO,
@@ -94,10 +92,8 @@  void musb_configure_ep(const struct musb_epinfo *epinfo, u8 cnt)
 			config_fifo(rx, idx, fifoaddr);
 
 			csr = readw(&musbr->rxcsr);
-#if defined(CONFIG_USB_MUSB_HCD)
 			/* clear the data toggle bit */
 			writew(csr | MUSB_RXCSR_CLRDATATOG, &musbr->rxcsr);
-#endif
 			/* Flush fifo if required */
 			if (csr & MUSB_RXCSR_RXPKTRDY)
 				writew(csr | MUSB_RXCSR_FLUSHFIFO,