mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-29 08:00:26 +09:00
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>
This commit is contained in:
parent
4cc53ef184
commit
a6f5e1b9cd
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user