[U-Boot] [PATCH 5/5] usb: ehci: Increase usb_companion_device_count when handing over devices
Hans de Goede
hdegoede at redhat.com
Tue May 5 15:28:20 CEST 2015
Increase usb_companion_device_count when handing over devices to the ehci's
companion controller. usb_init() will use this to short-circuit companion
bus scanning when no devices were handed over at all.
Signed-off-by: Hans de Goede <hdegoede at redhat.com>
---
drivers/usb/host/ehci-hcd.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 25981ef..40d6dc1 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -873,6 +873,7 @@ static int ehci_submit_root(struct usb_device *dev, unsigned long pipe,
/* Low speed device, give up ownership. */
debug("port %d low speed --> companion\n",
port - 1);
+ usb_companion_device_count++;
reg |= EHCI_PS_PO;
ehci_writel(status_reg, reg);
break;
@@ -902,6 +903,7 @@ static int ehci_submit_root(struct usb_device *dev, unsigned long pipe,
if ((reg & (EHCI_PS_PE | EHCI_PS_CS))
== EHCI_PS_CS && !ehci_is_TDI()) {
debug("port %d full speed --> companion\n", port - 1);
+ usb_companion_device_count++;
reg &= ~EHCI_PS_CLEAR;
reg |= EHCI_PS_PO;
ehci_writel(status_reg, reg);
--
2.3.6
More information about the U-Boot
mailing list