mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-29 08:00:26 +09:00
usb: Fix handover of full-speed devices from ehci to companion
When after a reset the port status connection bit is still set and the enable bit is not then we're dealing with a full-speed device and should hand it over to the companion controller. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
4588d61a28
commit
71b945267d
@ -897,11 +897,21 @@ static int ehci_submit_root(struct usb_device *dev, unsigned long pipe,
|
|||||||
*/
|
*/
|
||||||
ret = handshake(status_reg, EHCI_PS_PR, 0,
|
ret = handshake(status_reg, EHCI_PS_PR, 0,
|
||||||
2 * 1000);
|
2 * 1000);
|
||||||
if (!ret)
|
if (!ret) {
|
||||||
ctrl->portreset |= 1 << port;
|
reg = ehci_readl(status_reg);
|
||||||
else
|
if ((reg & (EHCI_PS_PE | EHCI_PS_CS))
|
||||||
|
== EHCI_PS_CS && !ehci_is_TDI()) {
|
||||||
|
debug("port %d full speed --> companion\n", port - 1);
|
||||||
|
reg &= ~EHCI_PS_CLEAR;
|
||||||
|
reg |= EHCI_PS_PO;
|
||||||
|
ehci_writel(status_reg, reg);
|
||||||
|
} else {
|
||||||
|
ctrl->portreset |= 1 << port;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
printf("port(%d) reset error\n",
|
printf("port(%d) reset error\n",
|
||||||
port - 1);
|
port - 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case USB_PORT_FEAT_TEST:
|
case USB_PORT_FEAT_TEST:
|
||||||
|
Loading…
Reference in New Issue
Block a user