public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/6] usb: Reduce USB scanning time
@ 2016-03-10 15:50 Stefan Roese
  2016-03-10 15:50 ` [U-Boot] [PATCH 1/6] usb: legacy_hub_port_reset(): Speedup hub reset handling Stefan Roese
                   ` (5 more replies)
  0 siblings, 6 replies; 25+ messages in thread
From: Stefan Roese @ 2016-03-10 15:50 UTC (permalink / raw)
  To: u-boot


My current x86 platform (Bay Trail, not in mainline yet) has a quite
complex USB infrastructure with many USB hubs. Here the USB scan takes
an incredible huge amount of time:

starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 9 USB Device(s) found

time: 28.415 seconds

This is of course not acceptable on platforms, where USB needs to get
scanned at every bootup. As this increases the bootup time of this
device by nearly 30 seconds!

This patch series greatly reduces the USB scanning time. This is done
by multiple means:

- Remove or reduce delays and timeouts
- Remove a 2nd reset of the USB hubs
- Introduce a static USB configuration method to skip specific
  USB ports while scanning

Even without the new static configuration (which can disable specified
ports), the resulting USB scanning time is greatly reduced:

starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 9 USB Device(s) found

time: 3.777 seconds

As you can see, the time is reduced from 28.4 to 3.8 seconds!

And with the static configuration, which can disable specific ports,
the time can be reduced even further.

Please find more details to the changes in the patch description.

This patch introduces the new configuration option CONFIG_USB_FAST_SCAN
to enable most of the speed enhancements. I'm actually not sure, if we
should introduce this config option at all. Or better unconditionally
apply all these changes to make this speedup default for all boards.
As this could break some USB configurations, it needs thorough testing
on many platforms before it becomes the default configuration.

Testing and comments welcome!

Thanks,
Stefan


Stefan Roese (6):
  usb: legacy_hub_port_reset(): Speedup hub reset handling
  usb: Remove 200 ms delay in usb_hub_port_connect_change()
  usb: Remove 1 second per port timeout in usb_hub_configure()
  usb: usb_hub_power_on(): Use 100ms power-on delay instead of 1 sec
    (optionally)
  usb: Don't reset the USB hub a 2nd time
  usb: Implement static USB port configuration to speed up USB scanning

 common/usb.c     |  6 ++++++
 common/usb_hub.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 69 insertions(+), 2 deletions(-)

-- 
2.7.2

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

end of thread, other threads:[~2016-03-11 15:08 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-10 15:50 [U-Boot] [PATCH 0/6] usb: Reduce USB scanning time Stefan Roese
2016-03-10 15:50 ` [U-Boot] [PATCH 1/6] usb: legacy_hub_port_reset(): Speedup hub reset handling Stefan Roese
2016-03-10 18:51   ` Hans de Goede
2016-03-11  6:37     ` Stefan Roese
2016-03-11  0:06   ` Stephen Warren
2016-03-10 15:50 ` [U-Boot] [PATCH 2/6] usb: Remove 200 ms delay in usb_hub_port_connect_change() Stefan Roese
2016-03-10 18:55   ` Hans de Goede
2016-03-11  6:34     ` Stefan Roese
2016-03-11  6:35     ` Stefan Roese
2016-03-11  0:06   ` Stephen Warren
2016-03-10 15:50 ` [U-Boot] [PATCH 3/6] usb: Remove 1 second per port timeout in usb_hub_configure() Stefan Roese
2016-03-10 18:59   ` Hans de Goede
2016-03-10 15:50 ` [U-Boot] [PATCH 4/6] usb: usb_hub_power_on(): Use 100ms power-on delay instead of 1 sec (optionally) Stefan Roese
2016-03-10 19:12   ` Hans de Goede
2016-03-11  9:05     ` Stefan Roese
2016-03-11 10:13     ` Stefan Roese
2016-03-11 10:32       ` Hans de Goede
2016-03-11 10:42         ` Stefan Roese
2016-03-10 15:50 ` [U-Boot] [PATCH 5/6] usb: Don't reset the USB hub a 2nd time Stefan Roese
2016-03-10 19:13   ` Hans de Goede
2016-03-11  6:43     ` Stefan Roese
2016-03-11  0:07   ` Stephen Warren
2016-03-10 15:50 ` [U-Boot] [PATCH 6/6] usb: Implement static USB port configuration to speed up USB scanning Stefan Roese
2016-03-10 19:18   ` Hans de Goede
2016-03-11 15:08     ` Stefan Roese

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox