[PATCH 4/7] usb: dwc3-generic: fix dwc3_setup_phy() return -ENOTSUPP causing init failure
Ran Wang
ran.wang_1 at nxp.com
Wed Oct 21 08:25:27 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>
---
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