diff options
author | Pali Rohár <pali@kernel.org> | 2021-02-07 16:50:04 +0300 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2021-03-03 06:12:45 +0300 |
commit | a6f5e1b9cdc9cb407ba440ca534ff0e29f987685 (patch) | |
tree | fb5680b600ec840209795b37a5f96290f9054aed /drivers/usb | |
parent | 4cc53ef1843448edf1b32bb19cfac1356eee3246 (diff) | |
download | u-boot-a6f5e1b9cdc9cb407ba440ca534ff0e29f987685.tar.xz |
usb: musb: Always clear the data toggle bit when configuring ep
Without this patch clearing was done only when U-Boot was compiled with
MUSB Host Controller. But clearing of data toggle bit is needed also for
MUSB Device Controller otherwise Device Controller does not work correctly.
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Acked-by: Pavel Machek <pavel@ucw.cz>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/musb/musb_core.c | 4 |
1 files changed, 0 insertions, 4 deletions
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, |