public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ran Wang <ran.wang_1@nxp.com>
To: u-boot@lists.denx.de
Subject: [PATCH v2 3/6] usb: dwc3-generic: fix dwc3_setup_phy() return -ENOTSUPP causing init failure
Date: Wed, 21 Oct 2020 18:02:26 +0800	[thread overview]
Message-ID: <20201021100229.18366-4-ran.wang_1@nxp.com> (raw)
In-Reply-To: <20201021100229.18366-1-ran.wang_1@nxp.com>

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@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

  parent reply	other threads:[~2020-10-21 10:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-21 10:02 [PATCH v2 0/6] dwc3-generic: Add Layerscape support Ran Wang
2020-10-21 10:02 ` [PATCH v2 1/6] usb: dwc3: Add frame length adjustment quirk Ran Wang
2020-11-30  1:45   ` Ran Wang
2020-10-21 10:02 ` [PATCH v2 2/6] usb: dwc3: Enable undefined length INCR burst type Ran Wang
2020-10-21 10:02 ` Ran Wang [this message]
2020-10-21 10:02 ` [PATCH v2 4/6] usb: dwc3-generic: Add support for the layerscape Ran Wang
2020-10-21 10:02 ` [PATCH v2 5/6] configs: ls1088a: add usb mass storage (device mode) support Ran Wang
2020-10-21 10:02 ` [PATCH v2 6/6] arm: dts: ls1088a: change dwc3 compatible to match dwc3-generic driver Ran Wang
2021-10-03 17:23   ` Michael Walle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201021100229.18366-4-ran.wang_1@nxp.com \
    --to=ran.wang_1@nxp.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox