[PATCH v2 3/6] usb: dwc3-generic: fix dwc3_setup_phy() return -ENOTSUPP causing init failure

Ran Wang ran.wang_1 at nxp.com
Wed Oct 21 12:02:26 CEST 2020


Some SoC such as Layerscape serials which don't require PHY related
programming in dwc3-generic.c. In this case (CONFIG_PHY is not set), the
dwc3_setup_phy() will return -ENOTSUPP, causing the whole init fail.
That should be avoided.

Signed-off-by: Ran Wang <ran.wang_1 at nxp.com>
---
Change in v2:
 - None

 drivers/usb/dwc3/dwc3-generic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c
index 36fa16a..d949083 100644
--- a/drivers/usb/dwc3/dwc3-generic.c
+++ b/drivers/usb/dwc3/dwc3-generic.c
@@ -74,7 +74,7 @@ static int dwc3_generic_probe(struct udevice *dev,
 	}
 
 	rc = dwc3_setup_phy(dev, &priv->phys);
-	if (rc)
+	if (rc && (rc != -ENOTSUPP))
 		return rc;
 
 	if (device_is_compatible(dev->parent, "rockchip,rk3399-dwc3"))
-- 
2.7.4



More information about the U-Boot mailing list