From: Neil Armstrong Date: Wed, 5 May 2021 10:41:50 +0200 Subject: [PATCH] usb: dwc3-meson-g12a: skip phy on -ENODATA aswell Message-ID: <20210505084150.3862010-1-narmstrong@baylibre.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- drivers/usb/dwc3/dwc3-meson-g12a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c index bd8bf227c8..90418ddc1d 100644 --- a/drivers/usb/dwc3/dwc3-meson-g12a.c +++ b/drivers/usb/dwc3/dwc3-meson-g12a.c @@ -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) -- 2.25.1