]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
usb: dwc3: Handle case where setup_phy is not needed
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Mon, 1 Apr 2019 08:49:20 +0000 (14:19 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 1 Apr 2019 08:51:55 +0000 (10:51 +0200)
If CONFIG_PHY is not enabled then the dwc3_setup_phy()
returns ENOTSUPP which can be still valid and intentional
so modify error check to handle this -ENOTSUPP.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/usb/dwc3/dwc3-generic.c

index 3e6c494dc62a0684755f1cad90805f43faa86f22..a261d8dc5f6290e60307ac08330614c2dba78c03 100644 (file)
@@ -47,7 +47,7 @@ static int dwc3_generic_peripheral_probe(struct udevice *dev)
        struct dwc3 *dwc3 = &priv->dwc3;
 
        rc = dwc3_setup_phy(dev, &priv->phys, &priv->num_phys);
-       if (rc)
+       if (rc && rc != -ENOTSUPP)
                return rc;
 
        dwc3->regs = map_physmem(priv->base, DWC3_OTG_REGS_END, MAP_NOCACHE);