Re: [U-Boot] [PATCH 1/1] USB: EHCI: Initialize multiple USB controllers at once

Dear Jim Lin,
sending the very same message eight (8!) times doesnot make it a bit more convincing - on contrary.
In message 4B9C9637D5087840A465BDCB251780E9E2D6EDA3F5@HKMAIL02.nvidia.com you wrote:
U-Boot is not multi-tasking, so you can always access only a single USB device at a time ayway. And it is a decoumented design principle that U-Boot must not initialize any devices it does not use itself.
So why?
Because of this complaint and request for devices under different controllers to be working at same time.
You make another claim here, but don't explain how this is supposed to work or whay the exact use case would be where this was needed. U-Boot will not be able to access multiple devices at the same time, so why would it be necessary to enable these? It should be sufficient to enable the controller that is responsible for the single device that is currently being used.
"One particularly annoying consequence of this is when you use the Seaboard configuration on Springbank. Seaboard selects Tegra's USB3 as "usb 0" device, which is the one you can use, in order not to conflict with the flashing USB port USB1. However, Springbank only exposes USB1 since USB3 is used internally for the USB keyboard/mouse. As such, you cannot use the USB port on Springbank under U-Boot at the moment. "
I have to admit that I cannot make any sense from this statement. The only thing I understand is that you are trying to use a configuration for one hardware (Seaboard) on another, incompatible hardware (Springbank).
The simple answer to this problem is: don't do that, then.
Best regards,
Wolfgang Denk

On 06/27/2012 12:55 AM, Wolfgang Denk wrote:
Dear Jim Lin,
sending the very same message eight (8!) times doesnot make it a bit more convincing - on contrary.
In message 4B9C9637D5087840A465BDCB251780E9E2D6EDA3F5@HKMAIL02.nvidia.com you wrote:
U-Boot is not multi-tasking, so you can always access only a single USB device at a time ayway. And it is a decoumented design principle that U-Boot must not initialize any devices it does not use itself.
So why?
Because of this complaint and request for devices under different controllers to be working at same time.
You make another claim here, but don't explain how this is supposed to work or whay the exact use case would be where this was needed. U-Boot will not be able to access multiple devices at the same time, so why would it be necessary to enable these? It should be sufficient to enable the controller that is responsible for the single device that is currently being used.
"One particularly annoying consequence of this is when you use the Seaboard configuration on Springbank. Seaboard selects Tegra's USB3 as "usb 0" device, which is the one you can use, in order not to conflict with the flashing USB port USB1. However, Springbank only exposes USB1 since USB3 is used internally for the USB keyboard/mouse. As such, you cannot use the USB port on Springbank under U-Boot at the moment. "
I have to admit that I cannot make any sense from this statement. The only thing I understand is that you are trying to use a configuration for one hardware (Seaboard) on another, incompatible hardware (Springbank).
The simple answer to this problem is: don't do that, then.
Seaboard and Springbank are essentially the same board, and hence are almost 100% SW compatible, so there's no problem running a Seaboard build of U-Boot/kernel/... on Springbank.
The primary issue here is that many boards have multiple USB ports. Users could plug e.g. a USB->Ethernet device into any of the ports. Requiring the user to know which port is which ID so they can issue the correct "usb start <n>" command is painful; no other SW stack limits itself to a single port and so most people don't have a clue which ports are numbered what; they just want USB to work.
The specific issue on Springbank is that there are multiple USB ports that are useful at the essentially the same time. One of the USB ports hosts a built-in USB keyboard (inside a sealed clamshell/netbook case), which we would like to use for the U-boot console. Another USB port is external, and people will plug in a USB->Ethernet dongle or USB storage device there. so, if I need to "usb start 0" to get the keyboard, and "usb start 1" to get USB Ethernet, then as soon as I "usb start 1" to get the Ethernet, I've just lost the console, and am unable to interact with U-Boot any more...

-----Original Message----- From: Stephen Warren [mailto:swarren@wwwdotorg.org] Sent: Thursday, June 28, 2012 12:58 AM To: Wolfgang Denk> Cc: Jim Lin; 'U-Boot@lists.denx.de'; Tom Warren Subject: Re: [U-Boot] [PATCH 1/1] USB: EHCI: Initialize multiple USB controllers at once
On 06/27/2012 12:55 AM, Wolfgang Denk wrote: Dear Jim Lin,
sending the very same message eight (8!) times doesnot make it a bit more convincing - on contrary.
In message 4B9C9637D5087840A465BDCB251780E9E2D6EDA3F5@HKMAIL02.nvidia.com you wrote:
U-Boot is not multi-tasking, so you can always access only a single USB device at a time ayway. And it is a decoumented design principle that U-Boot must not initialize any devices it does not use itself.>
So why?
Because of this complaint and request for devices under different controllers to be working at same time.
You make another claim here, but don't explain how this is supposed to work or whay the exact use case would be where this was needed. U-Boot will not be able to access multiple devices at the same time, so why would it be necessary to enable these? It should be sufficient to enable the controller that is responsible for the single device that is currently being used.
"One particularly annoying consequence of this is when you use the Seaboard configuration on Springbank. Seaboard selects Tegra's USB3 as "usb 0" device, which is the one you can use, in order not to conflict with the flashing USB port USB1. However, Springbank only exposes USB1 since USB3 is used internally for the USB keyboard/mouse. As such, you cannot use the USB port on Springbank under U-Boot at the moment. "
I have to admit that I cannot make any sense from this statement. The only thing I understand is that you are trying to use a configuration for one hardware (Seaboard) on another, incompatible hardware (Springbank).
The simple answer to this problem is: don't do that, then.
Seaboard and Springbank are essentially the same board, and hence are almost 100% SW compatible, so there's no problem running a Seaboard build of U-Boot/kernel/... on Springbank.
The primary issue here is that many boards have multiple USB ports. Users could plug e.g. a USB->Ethernet device into any of the ports. Requiring the user to know which port is which ID so they can issue the correct "usb start <n>" command is painful; no other SW stack limits itself to a single port and so most people don't have a clue which ports are numbered what; they just want USB to work.
The specific issue on Springbank is that there are multiple USB ports that are useful at the essentially the same time. One of the USB ports hosts a built-in USB keyboard (inside a sealed clamshell/netbook case), which we would like to use for the U-boot console. Another USB port is external, and people will plug in a USB->Ethernet dongle or USB storage device there. so, if I need to "usb start 0" to get the keyboard, and "usb start 1" to get USB Ethernet, then as soon as I "usb start 1" to get the Ethernet, I've just lost the console, and am unable to interact with U-Boot any more..
Wolfgang, Any further thought about Stephen's request? Thanks.
nvpublic

Wolfgang, Is there any chance to get this feature in after Stephen explained to you?
Thanks.
-----Original Message----- From: Stephen Warren [mailto:swarren@wwwdotorg.org] Sent: Thursday, June 28, 2012 12:58 AM To: Wolfgang Denk Cc: Jim Lin; 'U-Boot@lists.denx.de'; Tom Warren Subject: Re: [U-Boot] [PATCH 1/1] USB: EHCI: Initialize multiple USB controllers at once
On 06/27/2012 12:55 AM, Wolfgang Denk wrote:
Dear Jim Lin,
sending the very same message eight (8!) times doesnot make it a bit more convincing - on contrary.
In message 4B9C9637D5087840A465BDCB251780E9E2D6EDA3F5@HKMAIL02.nvidia.com you wrote:
U-Boot is not multi-tasking, so you can always access only a single USB device at a time ayway. And it is a decoumented design principle that U-Boot must not initialize any devices it does not use itself.
So why?
Because of this complaint and request for devices under different controllers to be working at same time.
You make another claim here, but don't explain how this is supposed to work or whay the exact use case would be where this was needed. U-Boot will not be able to access multiple devices at the same time, so why would it be necessary to enable these? It should be sufficient to enable the controller that is responsible for the single device that is currently being used.
"One particularly annoying consequence of this is when you use the Seaboard configuration on Springbank. Seaboard selects Tegra's USB3 as "usb 0" device, which is the one you can use, in order not to conflict with the flashing USB port USB1. However, Springbank only exposes USB1 since USB3 is used internally for the USB keyboard/mouse. As such, you cannot use the USB port on Springbank under U-Boot at the moment. "
I have to admit that I cannot make any sense from this statement. The only thing I understand is that you are trying to use a configuration for one hardware (Seaboard) on another, incompatible hardware (Springbank).
The simple answer to this problem is: don't do that, then.
Seaboard and Springbank are essentially the same board, and hence are almost 100% SW compatible, so there's no problem running a Seaboard build of U-Boot/kernel/... on Springbank.
The primary issue here is that many boards have multiple USB ports. Users could plug e.g. a USB->Ethernet device into any of the ports. Requiring the user to know which port is which ID so they can issue the correct "usb start <n>" command is painful; no other SW stack limits itself to a single port and so most people don't have a clue which ports are numbered what; they just want USB to work.
The specific issue on Springbank is that there are multiple USB ports that are useful at the essentially the same time. One of the USB ports hosts a built-in USB keyboard (inside a sealed clamshell/netbook case), which we would like to use for the U-boot console. Another USB port is external, and people will plug in a USB->Ethernet dongle or USB storage device there. so, if I need to "usb start 0" to get the keyboard, and "usb start 1" to get USB Ethernet, then as soon as I "usb start 1" to get the Ethernet, I've just lost the console, and am unable to interact with U-Boot any more...
-- nvpublic

Dear Jim Lin,
Wolfgang, Is there any chance to get this feature in after Stephen explained to you?
Thanks.
[...]
I'll poke into it. Can we not get rid of the added ifdef, eg. by setting up the controller number to 1 for those that don't define CONFIG_USB_MULTI now (everyone) and adding some wrapping goo?
Best regards, Marek Vasut

-----Original Message----- From: Marek Vasut [mailto:marek.vasut@gmail.com] Sent: Friday, July 27, 2012 5:26 PM To: u-boot@lists.denx.de Cc: Jim Lin; Wolfgang Denk; Tom Warren Subject: Re: [U-Boot] [PATCH 1/1] USB: EHCI: Initialize multiple USB controllers at once
Wolfgang, Is there any chance to get this feature in after Stephen explained to you?
I'll poke into it. Can we not get rid of the added ifdef, eg. by setting up the controller number to 1 for those that don't define CONFIG_USB_MULTI now (everyone)
I assume you want me to add these in next patch. 1 . Use CONFIG_USB_MULTI, instead of CONFIG_USB_INIT_MULTI (current patch), 2. If CONFIG_USB_MULTI is not defined, then define CONFIG_USB_MAX_CONTROLLER_COUNT as 1.
and adding some wrapping goo?
Don't understand what you meant. Could you provide an example? Thanks.
nvpublic

Dear Jim Lin,
-----Original Message----- From: Marek Vasut [mailto:marek.vasut@gmail.com] Sent: Friday, July 27, 2012 5:26 PM To: u-boot@lists.denx.de Cc: Jim Lin; Wolfgang Denk; Tom Warren Subject: Re: [U-Boot] [PATCH 1/1] USB: EHCI: Initialize multiple USB controllers at once
Wolfgang, Is there any chance to get this feature in after Stephen explained to you?
I'll poke into it. Can we not get rid of the added ifdef, eg. by setting up the controller number to 1 for those that don't define CONFIG_USB_MULTI now (everyone)
I assume you want me to add these in next patch. 1 . Use CONFIG_USB_MULTI, instead of CONFIG_USB_INIT_MULTI (current patch), 2. If CONFIG_USB_MULTI is not defined, then define CONFIG_USB_MAX_CONTROLLER_COUNT as 1.
Yes, is that a problem? Aka. have this always enabled and don't treat not having multiple controllers as a special case.
and adding some wrapping goo?
Don't understand what you meant. Could you provide an example?
Just don't treat having 1 controller as a special case, that's all I meant.
Thanks.
nvpublic
Best regards, Marek Vasut

-----Original Message----- From: Marek Vasut [mailto:marek.vasut@gmail.com] Sent: Monday, July 30, 2012 8:02 PM To: Jim Lin Cc: Wolfgang Denk; Tom Warren; u-boot@lists.denx.de Subject: Re: [U-Boot] [PATCH 1/1] USB: EHCI: Initialize multiple USB controllers at once
Dear Jim Lin,
-----Original Message----- From: Marek Vasut [mailto:marek.vasut@gmail.com] Sent: Friday, July 27, 2012 5:26 PM To: u-boot@lists.denx.de Cc: Jim Lin; Wolfgang Denk; Tom Warren Subject: Re: [U-Boot] [PATCH 1/1] USB: EHCI: Initialize multiple USB controllers at once
Wolfgang, Is there any chance to get this feature in after Stephen explained to you?
I'll poke into it. Can we not get rid of the added ifdef, eg. by setting up the controller number to 1 for those that don't define CONFIG_USB_MULTI now (everyone)
I assume you want me to add these in next patch. 1 . Use CONFIG_USB_MULTI, instead of CONFIG_USB_INIT_MULTI (current patch), 2. If CONFIG_USB_MULTI is not defined, then define CONFIG_USB_MAX_CONTROLLER_COUNT as 1.
Yes, is that a problem? Aka. have this always enabled and don't treat not having multiple controllers as a special case.
Item 2 is not necessary. Because CONFIG_USB_MAX_CONTROLLER_COUNT will not be used if CONFIG_USB_MULTI is not defined.
-- nvpublic

Dear Jim Lin,
-----Original Message----- From: Marek Vasut [mailto:marek.vasut@gmail.com] Sent: Monday, July 30, 2012 8:02 PM To: Jim Lin Cc: Wolfgang Denk; Tom Warren; u-boot@lists.denx.de Subject: Re: [U-Boot] [PATCH 1/1] USB: EHCI: Initialize multiple USB controllers at once
Dear Jim Lin,
-----Original Message----- From: Marek Vasut [mailto:marek.vasut@gmail.com] Sent: Friday, July 27, 2012 5:26 PM To: u-boot@lists.denx.de Cc: Jim Lin; Wolfgang Denk; Tom Warren Subject: Re: [U-Boot] [PATCH 1/1] USB: EHCI: Initialize multiple USB controllers at once
Wolfgang, Is there any chance to get this feature in after Stephen explained to you?
I'll poke into it. Can we not get rid of the added ifdef, eg. by setting up the controller number to 1 for those that don't define CONFIG_USB_MULTI now (everyone)
I assume you want me to add these in next patch. 1 . Use CONFIG_USB_MULTI, instead of CONFIG_USB_INIT_MULTI
(current patch),
- If CONFIG_USB_MULTI is not defined, then define
CONFIG_USB_MAX_CONTROLLER_COUNT as 1.
Yes, is that a problem? Aka. have this always enabled and don't treat not having multiple controllers as a special case.
Item 2 is not necessary. Because CONFIG_USB_MAX_CONTROLLER_COUNT will not be used if CONFIG_USB_MULTI is not defined.
But we don't need CONFIG_USB_MULTI option at all -- just assume it's always defined and unless a board has multiple controllers, define CONFIG_USB_MAX_CONTROLLER_COUNT to be 1.
Aka. it boils down to sticking
#ifndef CONFIG_USB_MAX_CONTROLLER_COUNT #define CONFIG_USB_MAX_CONTROLLER_COUNT 1 #endif
somewhere in usb.c or so.
Best regards, Marek Vasut
participants (4)
-
Jim Lin
-
Marek Vasut
-
Stephen Warren
-
Wolfgang Denk