From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukasz Majewski Date: Mon, 1 Apr 2019 09:32:43 +0200 Subject: [U-Boot] [PATCH] usb: dwc3: Handle case where setup_phy is not needed In-Reply-To: <1554099055-12817-1-git-send-email-siva.durga.paladugu@xilinx.com> References: <1554099055-12817-1-git-send-email-siva.durga.paladugu@xilinx.com> Message-ID: <20190401093243.655b20e4@jawa> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Siva Durga Prasad Paladugu, > If CONFIG_PHY is not enabled then the dwc3_setup_phy() > returns ENOTSUPP which can be still valid and intentional ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - could you elaborate on this a bit more? What is the use case when -ENOTSUPP is valid and intentional ? > so modify error check to handle this -ENOTSUPP. > > Signed-off-by: Siva Durga Prasad Paladugu > --- > 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 3e6c494..a261d8d 100644 > --- a/drivers/usb/dwc3/dwc3-generic.c > +++ b/drivers/usb/dwc3/dwc3-generic.c > @@ -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); Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 488 bytes Desc: OpenPGP digital signature URL: