linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: OMAP4: USB_EHCI_HCD needs USB_PHY and NOP_USB_XCEIV
       [not found] <CANsc=4W7ZVuCoimeALsv6xEQAURYc=QYsCvXd_kZD-A52aTL5w@mail.gmail.com>
@ 2013-05-25  4:43 ` Adrien Vergé
  2013-05-27 18:23   ` Arnd Bergmann
  0 siblings, 1 reply; 7+ messages in thread
From: Adrien Vergé @ 2013-05-25  4:43 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Alan Stern, Florian Fainelli, Arnd Bergmann,
	Manjunath Goudar, linux-usb, linux-kernel
  Cc: Yannick Brosseau

On OMAP4 platforms, EHCI HCD needs the physical layer signalling
activated, along with the NOP USB Transceiver driver. Otherwise, the
kernel boots without registering any USB device.

This patch applies to Linux 3.10-rc2.

Signed-off-by: Adrien Vergé <adrienverge@gmail.com>
---
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index de94f26..47959d7 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -44,6 +44,8 @@ endif # USB_XHCI_HCD
 config USB_EHCI_HCD
 	tristate "EHCI HCD (USB 2.0) support"
 	depends on USB_ARCH_HAS_EHCI
+	select USB_PHY if ARCH_OMAP4
+	select NOP_USB_XCEIV if ARCH_OMAP4
 	---help---
 	  The Enhanced Host Controller Interface (EHCI) is standard for USB 2.0
 	  "high speed" (480 Mbit/sec, 60 Mbyte/sec) host controller hardware.

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] ARM: OMAP4: USB_EHCI_HCD needs USB_PHY and NOP_USB_XCEIV
  2013-05-25  4:43 ` [PATCH] ARM: OMAP4: USB_EHCI_HCD needs USB_PHY and NOP_USB_XCEIV Adrien Vergé
@ 2013-05-27 18:23   ` Arnd Bergmann
  2013-05-28  8:14     ` Roger Quadros
  0 siblings, 1 reply; 7+ messages in thread
From: Arnd Bergmann @ 2013-05-27 18:23 UTC (permalink / raw)
  To: Adrien Vergé
  Cc: Greg Kroah-Hartman, Alan Stern, Florian Fainelli,
	Manjunath Goudar, linux-usb, linux-kernel, Yannick Brosseau,
	rogerq

On Saturday 25 May 2013, Adrien Vergé wrote:
> On OMAP4 platforms, EHCI HCD needs the physical layer signalling
> activated, along with the NOP USB Transceiver driver. Otherwise, the
> kernel boots without registering any USB device.

This does not actually sound like a critical error: If a user forgets
to enable a driver, that driver will not be loaded. Of course the
kernel should not just crash when a non-essential driver is missing,
and it should not fail to build, but your description sounds harmless.

Am I missing something?

> This patch applies to Linux 3.10-rc2.
> 
> Signed-off-by: Adrien Vergé <adrienverge@gmail.com>
> ---
> diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
> index de94f26..47959d7 100644
> --- a/drivers/usb/host/Kconfig
> +++ b/drivers/usb/host/Kconfig
> @@ -44,6 +44,8 @@ endif # USB_XHCI_HCD
>  config USB_EHCI_HCD
>         tristate "EHCI HCD (USB 2.0) support"

This is the wrong place: it should be in USB_EHCI_HCD_OMAP
if any.

>         depends on USB_ARCH_HAS_EHCI
> +       select USB_PHY if ARCH_OMAP4
> +       select NOP_USB_XCEIV if ARCH_OMAP4
>         ---help---
>           The Enhanced Host Controller Interface (EHCI) is standard for USB 2.0
>           "high speed" (480 Mbit/sec, 60 Mbyte/sec) host controller hardware.

'select'ing USB_PHY sounds wrong too, I think you mean 'depends on'.

Also note that Roger Quadros has just removed the 'select NOP_USB_XCEIV'
there, I think you should coordinate with him.

	Arnd

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ARM: OMAP4: USB_EHCI_HCD needs USB_PHY and NOP_USB_XCEIV
  2013-05-27 18:23   ` Arnd Bergmann
@ 2013-05-28  8:14     ` Roger Quadros
  2013-05-28  8:40       ` Arnd Bergmann
  2013-05-28 13:30       ` Adrien Vergé
  0 siblings, 2 replies; 7+ messages in thread
From: Roger Quadros @ 2013-05-28  8:14 UTC (permalink / raw)
  To: Adrien Vergé
  Cc: Arnd Bergmann, Greg Kroah-Hartman, Alan Stern, Florian Fainelli,
	Manjunath Goudar, linux-usb, linux-kernel, Yannick Brosseau,
	Balbi, Felipe

On 05/27/2013 09:23 PM, Arnd Bergmann wrote:
> On Saturday 25 May 2013, Adrien Vergé wrote:
>> On OMAP4 platforms, EHCI HCD needs the physical layer signalling
>> activated, along with the NOP USB Transceiver driver. Otherwise, the
>> kernel boots without registering any USB device.
> 
> This does not actually sound like a critical error: If a user forgets
> to enable a driver, that driver will not be loaded. Of course the
> kernel should not just crash when a non-essential driver is missing,
> and it should not fail to build, but your description sounds harmless.
> 
> Am I missing something?

Right, there is no crash or anything if the PHY drivers are not selected,
just that OMAP USB host will not work.

> 
>> This patch applies to Linux 3.10-rc2.
>>
>> Signed-off-by: Adrien Vergé <adrienverge@gmail.com>
>> ---
>> diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
>> index de94f26..47959d7 100644
>> --- a/drivers/usb/host/Kconfig
>> +++ b/drivers/usb/host/Kconfig
>> @@ -44,6 +44,8 @@ endif # USB_XHCI_HCD
>>  config USB_EHCI_HCD
>>         tristate "EHCI HCD (USB 2.0) support"
> 
> This is the wrong place: it should be in USB_EHCI_HCD_OMAP
> if any.

Right.
> 
>>         depends on USB_ARCH_HAS_EHCI
>> +       select USB_PHY if ARCH_OMAP4
>> +       select NOP_USB_XCEIV if ARCH_OMAP4
>>         ---help---
>>           The Enhanced Host Controller Interface (EHCI) is standard for USB 2.0
>>           "high speed" (480 Mbit/sec, 60 Mbyte/sec) host controller hardware.
> 
> 'select'ing USB_PHY sounds wrong too, I think you mean 'depends on'.
> 
> Also note that Roger Quadros has just removed the 'select NOP_USB_XCEIV'
> there, I think you should coordinate with him.

Selecting NOP_USB_XCEIV is wrong as it in turn depends on USB_PHY.

I'm not for depends as it would hide USB_EHCI_HCD_OMAP in menuconfig.
I'm for explicitly selecting both, as it makes the user's life much easier.
But I'm afraid maintainers might object to that.

The other option is to enable the required drivers in omap2plus_defconfig.
http://comments.gmane.org/gmane.linux.ports.arm.omap/97899

Maybe you could just resend that patch after addressing Kevin's comments?

cheers,
-roger

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ARM: OMAP4: USB_EHCI_HCD needs USB_PHY and NOP_USB_XCEIV
  2013-05-28  8:14     ` Roger Quadros
@ 2013-05-28  8:40       ` Arnd Bergmann
  2013-05-28  9:17         ` Roger Quadros
  2013-05-28 13:30       ` Adrien Vergé
  1 sibling, 1 reply; 7+ messages in thread
From: Arnd Bergmann @ 2013-05-28  8:40 UTC (permalink / raw)
  To: Roger Quadros
  Cc: Adrien Vergé, Greg Kroah-Hartman, Alan Stern,
	Florian Fainelli, Manjunath Goudar, linux-usb, linux-kernel,
	Yannick Brosseau, Balbi, Felipe

On Tuesday 28 May 2013 11:14:37 Roger Quadros wrote:
> >>         depends on USB_ARCH_HAS_EHCI
> >> +       select USB_PHY if ARCH_OMAP4
> >> +       select NOP_USB_XCEIV if ARCH_OMAP4
> >>         ---help---
> >>           The Enhanced Host Controller Interface (EHCI) is standard for USB 2.0
> >>           "high speed" (480 Mbit/sec, 60 Mbyte/sec) host controller hardware.
> > 
> > 'select'ing USB_PHY sounds wrong too, I think you mean 'depends on'.
> > 
> > Also note that Roger Quadros has just removed the 'select NOP_USB_XCEIV'
> > there, I think you should coordinate with him.
> 
> Selecting NOP_USB_XCEIV is wrong as it in turn depends on USB_PHY.
> 
> I'm not for depends as it would hide USB_EHCI_HCD_OMAP in menuconfig.
> I'm for explicitly selecting both, as it makes the user's life much easier.
> But I'm afraid maintainers might object to that.

My preferred option would be to turn the 'menuconfig PHY' into 'menu',
which is what we did to solve a similar problem in drivers/mfd: It lets
us 'select' specific PHY drivers without turning on the entire
menu. Using 'select PHY' has the nasty side-effect of creating an
incorrect dependency between the OMAP EHCI driver and all the
non-OMAP phy drivers that become visible once the usb-phy directory
gets enabled.

	Arnd

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ARM: OMAP4: USB_EHCI_HCD needs USB_PHY and NOP_USB_XCEIV
  2013-05-28  8:40       ` Arnd Bergmann
@ 2013-05-28  9:17         ` Roger Quadros
  0 siblings, 0 replies; 7+ messages in thread
From: Roger Quadros @ 2013-05-28  9:17 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Adrien Vergé, Greg Kroah-Hartman, Alan Stern,
	Florian Fainelli, Manjunath Goudar, linux-usb, linux-kernel,
	Yannick Brosseau, Balbi, Felipe

On 05/28/2013 11:40 AM, Arnd Bergmann wrote:
> On Tuesday 28 May 2013 11:14:37 Roger Quadros wrote:
>>>>         depends on USB_ARCH_HAS_EHCI
>>>> +       select USB_PHY if ARCH_OMAP4
>>>> +       select NOP_USB_XCEIV if ARCH_OMAP4
>>>>         ---help---
>>>>           The Enhanced Host Controller Interface (EHCI) is standard for USB 2.0
>>>>           "high speed" (480 Mbit/sec, 60 Mbyte/sec) host controller hardware.
>>>
>>> 'select'ing USB_PHY sounds wrong too, I think you mean 'depends on'.
>>>
>>> Also note that Roger Quadros has just removed the 'select NOP_USB_XCEIV'
>>> there, I think you should coordinate with him.
>>
>> Selecting NOP_USB_XCEIV is wrong as it in turn depends on USB_PHY.
>>
>> I'm not for depends as it would hide USB_EHCI_HCD_OMAP in menuconfig.
>> I'm for explicitly selecting both, as it makes the user's life much easier.
>> But I'm afraid maintainers might object to that.
> 
> My preferred option would be to turn the 'menuconfig PHY' into 'menu',
> which is what we did to solve a similar problem in drivers/mfd: It lets
> us 'select' specific PHY drivers without turning on the entire
> menu. Using 'select PHY' has the nasty side-effect of creating an
> incorrect dependency between the OMAP EHCI driver and all the
> non-OMAP phy drivers that become visible once the usb-phy directory
> gets enabled.
>

Good idea, thanks. I will give this a try.

cheers,
-roger

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ARM: OMAP4: USB_EHCI_HCD needs USB_PHY and NOP_USB_XCEIV
  2013-05-28  8:14     ` Roger Quadros
  2013-05-28  8:40       ` Arnd Bergmann
@ 2013-05-28 13:30       ` Adrien Vergé
  2013-05-28 14:34         ` Roger Quadros
  1 sibling, 1 reply; 7+ messages in thread
From: Adrien Vergé @ 2013-05-28 13:30 UTC (permalink / raw)
  To: Roger Quadros
  Cc: Arnd Bergmann, Greg Kroah-Hartman, Alan Stern, Florian Fainelli,
	Manjunath Goudar, linux-usb, linux-kernel, Yannick Brosseau,
	Balbi, Felipe

Dear Arnd and Roger, thank you for your answers.

2013/5/28 Roger Quadros <rogerq@ti.com>
> Selecting NOP_USB_XCEIV is wrong as it in turn depends on USB_PHY.
>
> I'm not for depends as it would hide USB_EHCI_HCD_OMAP in menuconfig.
> I'm for explicitly selecting both, as it makes the user's life much
> easier.
> But I'm afraid maintainers might object to that.
>
> The other option is to enable the required drivers in omap2plus_defconfig.
> http://comments.gmane.org/gmane.linux.ports.arm.omap/97899

This seems a good idea to me, since many OMAP users boot with NFS and
need USB directly working (Ethernet over USB).

> Maybe you could just resend that patch after addressing Kevin's comments?

It's sad that USB_EHCI_HCD is too instable to be added in omap2plus_defconfig.
Still, USB_PHY and NOP_USB_XCEIV are needed since v3.10 for USB
support (and harmless): should I send a patch adding those two in
omap2plus_defconfig?

Cheers,
Adrien

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ARM: OMAP4: USB_EHCI_HCD needs USB_PHY and NOP_USB_XCEIV
  2013-05-28 13:30       ` Adrien Vergé
@ 2013-05-28 14:34         ` Roger Quadros
  0 siblings, 0 replies; 7+ messages in thread
From: Roger Quadros @ 2013-05-28 14:34 UTC (permalink / raw)
  To: Adrien Vergé
  Cc: Arnd Bergmann, Greg Kroah-Hartman, Alan Stern, Florian Fainelli,
	Manjunath Goudar, linux-usb, linux-kernel, Yannick Brosseau,
	Balbi, Felipe

Adrien,

On 05/28/2013 04:30 PM, Adrien Vergé wrote:
> Dear Arnd and Roger, thank you for your answers.
> 
> 2013/5/28 Roger Quadros <rogerq@ti.com>
>> Selecting NOP_USB_XCEIV is wrong as it in turn depends on USB_PHY.
>>
>> I'm not for depends as it would hide USB_EHCI_HCD_OMAP in menuconfig.
>> I'm for explicitly selecting both, as it makes the user's life much
>> easier.
>> But I'm afraid maintainers might object to that.
>>
>> The other option is to enable the required drivers in omap2plus_defconfig.
>> http://comments.gmane.org/gmane.linux.ports.arm.omap/97899
> 
> This seems a good idea to me, since many OMAP users boot with NFS and
> need USB directly working (Ethernet over USB).
> 
>> Maybe you could just resend that patch after addressing Kevin's comments?
> 
> It's sad that USB_EHCI_HCD is too instable to be added in omap2plus_defconfig.

This is not true as of today. A lot has changed since 2012 and most of the issues that Kevin
had pointed out then have been fixed. The only piece that is missing is allowing the system
to hit lower power states (e.g. RETention) when USB host is suspended. This feature
will eventually be supported when we have IO daisy chaining working with device tree.

> Still, USB_PHY and NOP_USB_XCEIV are needed since v3.10 for USB
> support (and harmless): should I send a patch adding those two in
> omap2plus_defconfig?

Yes please. Thanks :). I'm working on the approach Arnd suggested as well.

cheers,
-roger

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-05-28 14:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CANsc=4W7ZVuCoimeALsv6xEQAURYc=QYsCvXd_kZD-A52aTL5w@mail.gmail.com>
2013-05-25  4:43 ` [PATCH] ARM: OMAP4: USB_EHCI_HCD needs USB_PHY and NOP_USB_XCEIV Adrien Vergé
2013-05-27 18:23   ` Arnd Bergmann
2013-05-28  8:14     ` Roger Quadros
2013-05-28  8:40       ` Arnd Bergmann
2013-05-28  9:17         ` Roger Quadros
2013-05-28 13:30       ` Adrien Vergé
2013-05-28 14:34         ` Roger Quadros

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).