Message ID | 20200916125705.4341-10-peng.fan@nxp.com |
---|---|
State | Deferred |
Delegated to: | Tom Rini |
Headers | show |
Series | ehci-mx6: update and fix | expand |
On 9/16/20 2:57 PM, peng.fan@nxp.com wrote: > From: Ye Li <ye.li@nxp.com> > > Some iMX6 platforms will meet "EHCI timed out on TD" when reading > or writing data to USB disk. The root cause is last QTD reports > data buffer error. > Accroding to RM, this event indicates that an overrun of incoming > data or a underrun of outgoing data has occurred for this transaction. > This would generally be caused by the host controller not being able > to access required data buffers in memory within necessary latency > requirements. How do you even trigger this in U-Boot ?
diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c index de0b0c3156..aa0c1c355d 100644 --- a/drivers/usb/host/ehci-mx6.c +++ b/drivers/usb/host/ehci-mx6.c @@ -488,6 +488,11 @@ int ehci_hcd_init(int index, enum usb_init_type init, board_ehci_power(index, (type == USB_INIT_DEVICE) ? 0 : 1); if (type != init) return -ENODEV; + + if (is_mx6dqp() || is_mx6dq() || is_mx6sdl() || + ((is_mx6sl() || is_mx6sx()) && type == USB_INIT_HOST)) + setbits_le32(&ehci->usbmode, SDIS); + if (type == USB_INIT_DEVICE) return 0; @@ -542,6 +547,10 @@ static int mx6_init_after_reset(struct ehci_ctrl *dev) } #endif + if (is_mx6dqp() || is_mx6dq() || is_mx6sdl() || + ((is_mx6sl() || is_mx6sx()) && type == USB_INIT_HOST)) + setbits_le32(&ehci->usbmode, SDIS); + if (type == USB_INIT_DEVICE) return 0;