diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2022-04-25 13:26:45 +0200 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2022-05-20 23:30:36 +0200 |
commit | 868d58f69c7ceda5c886293cf15f4e39493517a2 (patch) | |
tree | 01abe7a3a956ff191d7f4c29de44759398c6f6f2 | |
parent | 6a6468f479a7e816fb656b3e1d8af30c7de837a4 (diff) | |
download | u-boot-868d58f69c7ceda5c886293cf15f4e39493517a2.zip u-boot-868d58f69c7ceda5c886293cf15f4e39493517a2.tar.gz u-boot-868d58f69c7ceda5c886293cf15f4e39493517a2.tar.bz2 |
usb: dwc3: Fix non-usb3 configurations
Missing nodes may also be signaled via -ENODATA. We need to check for
that to prevent failing in non-usb3 setups.
Furthermore, dev.phy must be NULL'ed in case usb3-phy was not found.
Fixes: 142d50fbce7c ("usb: dwc3: Add support for usb3-phy PHY configuration")
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
-rw-r--r-- | drivers/usb/dwc3/dwc3-generic.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c index 6e1a1d0..c5310e4 100644 --- a/drivers/usb/dwc3/dwc3-generic.c +++ b/drivers/usb/dwc3/dwc3-generic.c @@ -468,9 +468,11 @@ static int dwc3_glue_probe(struct udevice *dev) ret = generic_phy_init(&phy); if (ret) return ret; - } else if (ret != -ENOENT) { + } else if (ret != -ENOENT && ret != -ENODATA) { debug("could not get phy (err %d)\n", ret); return ret; + } else { + phy.dev = NULL; } glue->regs = dev_read_addr(dev); |