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 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot