]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
usb: dwc3-meson-g12a: skip phy on -ENODATA aswell
authorNeil Armstrong <narmstrong@baylibre.com>
Wed, 5 May 2021 08:38:57 +0000 (10:38 +0200)
committerNeil Armstrong <narmstrong@baylibre.com>
Fri, 14 May 2021 15:41:12 +0000 (17:41 +0200)
If the PHY isn't specified in the DT, -ENODATA means it should be skipped,
handle it like -ENOENT.

With that, devices without USB3 supported can have USB working (Odroid-HC4).

Fixes: adb049abf7 ("usb: dwc3: Add Meson G12A USB Glue")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
drivers/usb/dwc3/dwc3-meson-g12a.c

index bd8bf227c8bf0a4258dfaea5ee849c852654412b..90418ddc1dabf59cae7a57d862c59f858ed46faa 100644 (file)
@@ -298,7 +298,7 @@ static int dwc3_meson_g12a_get_phys(struct dwc3_meson_g12a *priv)
        for (i = 0 ; i < PHY_COUNT ; ++i) {
                ret = generic_phy_get_by_name(priv->dev, phy_names[i],
                                              &priv->phys[i]);
-               if (ret == -ENOENT)
+               if (ret == -ENOENT || ret == -ENODATA)
                        continue;
 
                if (ret)