All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] USB: relax usbcore reset timings
@ 2011-12-21 10:01 Wolfgang Grandegger
  2012-01-15 19:49 ` Remy Bohmer
  2012-02-26 23:10 ` Marek Vasut
  0 siblings, 2 replies; 5+ messages in thread
From: Wolfgang Grandegger @ 2011-12-21 10:01 UTC (permalink / raw)
  To: u-boot

From: Wolfgang Grandegger <wg@denx.de>

Following the corresponding Linux code, this patch relaxes reset timings
waiting at least 100ms after power to the ports. There are some reports
that it helps make enumeration work better on some high speed devices.
Furthermore, the wait is only done once after power has been enabled
on all ports.

CC: Remy Bohmer <linux@bohmer.net>
CC: Vincent Palatin <vpalatin@chromium.org>
Signed-off-by: Wolfgang Grandegger <wg@denx.de>
---
 common/usb.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/common/usb.c b/common/usb.c
index 63a11c8..d13dab8 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -1035,6 +1035,7 @@ static void usb_hub_power_on(struct usb_hub_device *hub)
 {
 	int i;
 	struct usb_device *dev;
+	unsigned pgood_delay = hub->desc.bPwrOn2PwrGood * 2;
 
 	dev = hub->pusb_dev;
 	/* Enable power to the ports */
@@ -1042,8 +1043,10 @@ static void usb_hub_power_on(struct usb_hub_device *hub)
 	for (i = 0; i < dev->maxchild; i++) {
 		usb_set_port_feature(dev, i + 1, USB_PORT_FEAT_POWER);
 		USB_HUB_PRINTF("port %d returns %lX\n", i + 1, dev->status);
-		wait_ms(hub->desc.bPwrOn2PwrGood * 2);
 	}
+
+	/* Wait at least 100 msec for power to become stable */
+	wait_ms(max(pgood_delay, (unsigned)100));
 }
 
 void usb_hub_reset(void)
-- 
1.7.6.4

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

* [U-Boot] [PATCH] USB: relax usbcore reset timings
  2011-12-21 10:01 [U-Boot] [PATCH] USB: relax usbcore reset timings Wolfgang Grandegger
@ 2012-01-15 19:49 ` Remy Bohmer
  2012-02-26 23:10 ` Marek Vasut
  1 sibling, 0 replies; 5+ messages in thread
From: Remy Bohmer @ 2012-01-15 19:49 UTC (permalink / raw)
  To: u-boot

Hi,

2011/12/21 Wolfgang Grandegger <wg@grandegger.com>:
> From: Wolfgang Grandegger <wg@denx.de>
>
> Following the corresponding Linux code, this patch relaxes reset timings
> waiting at least 100ms after power to the ports. There are some reports
> that it helps make enumeration work better on some high speed devices.
> Furthermore, the wait is only done once after power has been enabled
> on all ports.
>
> CC: Remy Bohmer <linux@bohmer.net>
> CC: Vincent Palatin <vpalatin@chromium.org>
> Signed-off-by: Wolfgang Grandegger <wg@denx.de>
> ---
> ?common/usb.c | ? ?5 ++++-
> ?1 files changed, 4 insertions(+), 1 deletions(-)

Applied to u-boot-usb.
Thanks.

Kind regards,

Remy

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

* [U-Boot] [PATCH] USB: relax usbcore reset timings
  2011-12-21 10:01 [U-Boot] [PATCH] USB: relax usbcore reset timings Wolfgang Grandegger
  2012-01-15 19:49 ` Remy Bohmer
@ 2012-02-26 23:10 ` Marek Vasut
  2012-02-27  8:09   ` Wolfgang Grandegger
  1 sibling, 1 reply; 5+ messages in thread
From: Marek Vasut @ 2012-02-26 23:10 UTC (permalink / raw)
  To: u-boot

> From: Wolfgang Grandegger <wg@denx.de>
> 
> Following the corresponding Linux code, this patch relaxes reset timings
> waiting at least 100ms after power to the ports. There are some reports
> that it helps make enumeration work better on some high speed devices.
> Furthermore, the wait is only done once after power has been enabled
> on all ports.
> 
> CC: Remy Bohmer <linux@bohmer.net>
> CC: Vincent Palatin <vpalatin@chromium.org>
> Signed-off-by: Wolfgang Grandegger <wg@denx.de>
> ---

Hi,

what's the status of this patch/patchset?

Thanks
M

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

* [U-Boot] [PATCH] USB: relax usbcore reset timings
  2012-02-26 23:10 ` Marek Vasut
@ 2012-02-27  8:09   ` Wolfgang Grandegger
  2012-02-27 13:41     ` Marek Vasut
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Grandegger @ 2012-02-27  8:09 UTC (permalink / raw)
  To: u-boot

On 02/27/2012 12:10 AM, Marek Vasut wrote:
>> From: Wolfgang Grandegger <wg@denx.de>
>>
>> Following the corresponding Linux code, this patch relaxes reset timings
>> waiting at least 100ms after power to the ports. There are some reports
>> that it helps make enumeration work better on some high speed devices.
>> Furthermore, the wait is only done once after power has been enabled
>> on all ports.
>>
>> CC: Remy Bohmer <linux@bohmer.net>
>> CC: Vincent Palatin <vpalatin@chromium.org>
>> Signed-off-by: Wolfgang Grandegger <wg@denx.de>
>> ---
> 
> Hi,
> 
> what's the status of this patch/patchset?

Already a while ago Remy wrote "Applied to u-boot-usb" but I can't find
it yet in mainline. Remy?

Wolfgang

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

* [U-Boot] [PATCH] USB: relax usbcore reset timings
  2012-02-27  8:09   ` Wolfgang Grandegger
@ 2012-02-27 13:41     ` Marek Vasut
  0 siblings, 0 replies; 5+ messages in thread
From: Marek Vasut @ 2012-02-27 13:41 UTC (permalink / raw)
  To: u-boot

> On 02/27/2012 12:10 AM, Marek Vasut wrote:
> >> From: Wolfgang Grandegger <wg@denx.de>
> >> 
> >> Following the corresponding Linux code, this patch relaxes reset timings
> >> waiting at least 100ms after power to the ports. There are some reports
> >> that it helps make enumeration work better on some high speed devices.
> >> Furthermore, the wait is only done once after power has been enabled
> >> on all ports.
> >> 
> >> CC: Remy Bohmer <linux@bohmer.net>
> >> CC: Vincent Palatin <vpalatin@chromium.org>
> >> Signed-off-by: Wolfgang Grandegger <wg@denx.de>
> >> ---
> > 
> > Hi,
> > 
> > what's the status of this patch/patchset?
> 
> Already a while ago Remy wrote "Applied to u-boot-usb" but I can't find
> it yet in mainline. Remy?
> 
> Wolfgang

Well, Remy seems N/A recently, I'll apply these on my tree and send pull RQ 
after EW. Ok with you ?

M

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

end of thread, other threads:[~2012-02-27 13:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-21 10:01 [U-Boot] [PATCH] USB: relax usbcore reset timings Wolfgang Grandegger
2012-01-15 19:49 ` Remy Bohmer
2012-02-26 23:10 ` Marek Vasut
2012-02-27  8:09   ` Wolfgang Grandegger
2012-02-27 13:41     ` Marek Vasut

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.