From: Lukasz Majewski <lukma@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] usb: dwc3: Handle case where setup_phy is not needed
Date: Mon, 1 Apr 2019 12:34:18 +0200 [thread overview]
Message-ID: <20190401123418.5e77ee3d@jawa> (raw)
In-Reply-To: <BN6PR02MB2290DF2FCAB2D9DC6A56B364D9550@BN6PR02MB2290.namprd02.prod.outlook.com>
On Mon, 1 Apr 2019 10:23:42 +0000
Siva Durga Prasad Paladugu <sivadur@xilinx.com> wrote:
> Hi Lukasz,
>
> > -----Original Message-----
> > From: Lukasz Majewski [mailto:lukma at denx.de]
> > Sent: Monday, April 01, 2019 1:03 PM
> > To: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
> > Cc: u-boot at lists.denx.de; marex at denx.de; jjhiblot at ti.com;
> > sjg at chromium.org; patrick.delaunay at st.com; Michal Simek
> > <michals@xilinx.com>
> > Subject: Re: [PATCH] usb: dwc3: Handle case where setup_phy is not
> > needed
> >
> > 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 ?
>
> In the cases where phy will be setup by First stage boot loader
> itself and don't want to do it again at u-boot.
I think that I saw some time ago similar patch for uart - on IMX IIRC
(it was also setup by BootROM on SoC).
Maybe we would need some kind of switch in Kconfig to indicate this use
case?
Another option would be to mark this in DTS as TI specific property?
My point is that we shall not proceed with the flow when we do receive
-ENOTSUPP
>
> Thanks,
> Siva
>
> >
> > > so modify error check to handle this -ENOTSUPP.
> > >
> > > Signed-off-by: Siva Durga Prasad Paladugu
> > > <siva.durga.paladugu@xilinx.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 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
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: <http://lists.denx.de/pipermail/u-boot/attachments/20190401/1916899a/attachment.sig>
next prev parent reply other threads:[~2019-04-01 10:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-01 6:10 [U-Boot] [PATCH] usb: dwc3: Handle case where setup_phy is not needed Siva Durga Prasad Paladugu
2019-04-01 7:32 ` Lukasz Majewski
2019-04-01 10:23 ` Siva Durga Prasad Paladugu
2019-04-01 10:34 ` Lukasz Majewski [this message]
2019-04-01 10:38 ` Siva Durga Prasad Paladugu
2019-04-01 10:39 ` Michal Simek
2019-05-28 10:06 ` Siva Durga Prasad Paladugu
2019-06-06 10:13 ` Siva Durga Prasad Paladugu
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=20190401123418.5e77ee3d@jawa \
--to=lukma@denx.de \
--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