From: Alan Stern <stern@rowland.harvard.edu>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH] usb: phy: Move R-Car Gen2 driver registration to postcore_inictall
Date: Fri, 01 Nov 2013 14:17:18 +0000 [thread overview]
Message-ID: <Pine.LNX.4.44L0.1311011010340.1364-100000@iolanthe.rowland.org> (raw)
In-Reply-To: <1383063666-4291-1-git-send-email-valentine.barshak@cogentembedded.com>
On Fri, 1 Nov 2013, Valentine wrote:
> > You need to tell usb_hcd_pci_probe() to wait for the PHY. That seems
> > to be the proper solution to your problem.
> >
> > The difficulty is that you have a discoverable device (the PCI EHCI
> > controller) which needs to wait for a platform device (the PHY). The
> > kernel doesn't have a good way to describe such a constraint between
> > two different kinds of device like that, as far as I know.
>
> Thanks, unfortunately this doesn't help.
> I'm not sure how this problem should be addressed using USB HCD PCI deferred probing.
I'm not sure either. It requires further discussion, and it is an
important problem. Not a trivial one, as you seem to think.
> However, at the same time I see that six usb phy drivers use subsys_initcall and one
> uses postcore_initcall to adjust the initialization order.
>
> The same approach is used with other drivers quite often. Take I2C, for example.
> I'm not sure why we can't use it here with the R-Car Gen2 phy.
The fact that other drivers do it doesn't mean it is the right thing to
do. (Besides, I2C is different from PCI because it isn't discoverable,
right?)
Greg KH can explain further, if you ask him.
> This driver is used only with R-Car SoC and the approach is trivial and working fine.
>
> Why can't we use it instead of trying to create a bigger mess in the USB HCD PCI driver,
> which is used on quite a number of platforms, to workaround the PHY initialization order
> that is only relevant to R-Car Gen2 SoC?
Because other platforms are likely to experience the same problem in
the future. And as you pointed out, other platforms already _are_
experiencing this problem (although perhaps for other drivers).
We should implement a proper solution. One that can be used
everywhere, not an initcall-order hack.
Alan Stern
next prev parent reply other threads:[~2013-11-01 14:17 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-29 16:21 [PATCH] usb: phy: Move R-Car Gen2 driver registration to postcore_inictall Valentine Barshak
2013-10-29 16:59 ` Laurent Pinchart
2013-10-29 17:19 ` Valentine
2013-10-29 23:57 ` Greg KH
2013-10-30 9:56 ` Valentine
2013-10-30 14:12 ` Greg KH
2013-10-30 23:36 ` Valentine
2013-10-31 11:43 ` Valentine
2013-10-31 16:12 ` Ulrich Hecht
2013-10-31 16:29 ` Valentine
2013-10-31 16:54 ` Alan Stern
2013-11-01 13:59 ` Valentine
2013-11-01 14:17 ` Alan Stern [this message]
2013-11-01 14:32 ` Greg KH
2013-11-01 15:04 ` Valentine
2013-11-01 15:26 ` Valentine
2013-11-01 15:30 ` Greg KH
2013-11-01 15:33 ` Greg KH
2013-11-01 15:55 ` Alan Stern
2013-11-05 19:57 ` Valentine
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=Pine.LNX.4.44L0.1311011010340.1364-100000@iolanthe.rowland.org \
--to=stern@rowland.harvard.edu \
--cc=linux-sh@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).