linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH] usb: phy: Move R-Car Gen2 driver registration to postcore_inictall
Date: Wed, 30 Oct 2013 14:12:49 +0000	[thread overview]
Message-ID: <20131030141249.GA30896@kroah.com> (raw)
In-Reply-To: <1383063666-4291-1-git-send-email-valentine.barshak@cogentembedded.com>

On Wed, Oct 30, 2013 at 01:56:25PM +0400, Valentine wrote:
> On 10/30/2013 03:57 AM, Greg KH wrote:
> > On Tue, Oct 29, 2013 at 09:19:09PM +0400, Valentine wrote:
> >> On 10/29/2013 09:00 PM, Laurent Pinchart wrote:
> >>> Hi Valentine,
> >>>
> >>> Thank you for the patch.
> >>>
> >>> On Tuesday 29 October 2013 20:21:06 Valentine Barshak wrote:
> >>>> USB phy controls USB channels 0 and 2 which are shared between
> >>>> PCI USB host controllers and USBHS/USBSS respectively.
> >>>>
> >>>> This Initializes USB phy driver earlier because we need it
> >>>> before PCI USB host controllers are initialized.
> >>>
> >>> Can't you use deferred probing ?
> >>
> >> No, unfortunately this doesn't work with PCI.
> >> We need the USB PHY set up before the PCI driver starts.
> >> PCI controllers should be initialized via subsys_initcall and can't be built as a module.
> >> Deferred probing is done at late_initcall and that's far too late in this case.
> >>
> >> The MXS USB phy uses the similar approach, initializing the driver via postcore_initcall.
> >
> > I _HATE_ this "make this driver later than the others" mess.  I'll not
> 
> This is actually "make this driver before the others" mess.
> 
> > take patches that move drivers to different initcalls, sorry.  Please
> > fix up the link order, or use deferred probing, as that is why it was
> > created.
> >
> 
> This is needed for the PCI EHCI/OHCI drivers to operate correctly on R-Car Gen platform
> since it has built-in PCI host controllers that share USB I/O with USBHS/USBSS devices.
> The phy has to be configured before the PCI EHCI/OHCI devices are probed.
> 
> I'd really appreciate if you could give me a hint on how to fix the PCI EHCI/OHCI driver
> to use deferred probing, or fix the link order without creating a bigger mess.

Just change the PCI driver to use deferred probing, it isn't that hard
to do so.

good luck,

greg k-h

  parent reply	other threads:[~2013-10-30 14:12 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 [this message]
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
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=20131030141249.GA30896@kroah.com \
    --to=greg@kroah.com \
    --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).