]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
usb: ehci-omap: Move omap_ehci_hcd_init to omap_ehci_probe
authorAdam Ford <aford173@gmail.com>
Sat, 19 Feb 2022 23:08:42 +0000 (17:08 -0600)
committerMarek Vasut <marex@denx.de>
Wed, 23 Feb 2022 04:25:17 +0000 (05:25 +0100)
The OMAP3 hierarchy has the ehci node as a sub-node of the
usbhshost. The usbhshost node contains an ohci and an ehci
subnode.  The configuration of the ehci belongs in the
EHCI node and not its parent.  Move it to the proper probe.

usb start
  starting USB...
  Bus ehci@48064800: USB EHCI 1.00
  Bus usb_otg_hs@480ab000: Port not available.
  scanning bus ehci@48064800 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found

Signed-off-by: Adam Ford <aford173@gmail.com>
drivers/usb/host/ehci-omap.c

index d34c0add4a0f17cbed8f2291a4acec3e3d02cc8e..5f79279fe2f09a1da4ef3dd54e16b4b27831de2f 100644 (file)
@@ -312,7 +312,7 @@ static int omap_usbhs_probe(struct udevice *dev)
                        omap_usbhs_set_mode(i, mode);
        }
 
-       return omap_ehci_hcd_init(0, &usbhs_bdata);
+       return 0;
 }
 
 static const struct udevice_id omap_usbhs_dt_ids[] = {
@@ -355,6 +355,7 @@ static int omap_ehci_probe(struct udevice *dev)
        struct ehci_omap_priv_data *priv = dev_get_priv(dev);
        struct ehci_hccr *hccr;
        struct ehci_hcor *hcor;
+       int ret;
 
        priv->ehci = dev_read_addr_ptr(dev);
        priv->portnr = dev_seq(dev);
@@ -363,6 +364,10 @@ static int omap_ehci_probe(struct udevice *dev)
        hccr = (struct ehci_hccr *)&priv->ehci->hccapbase;
        hcor = (struct ehci_hcor *)&priv->ehci->usbcmd;
 
+       ret = omap_ehci_hcd_init(0, &usbhs_bdata);
+       if (ret)
+               return ret;
+
        return ehci_register(dev, hccr, hcor, NULL, 0, USB_INIT_HOST);
 }