The usleep_range() function takes a min, max parameter and it's supposed to sleep for between min and max microseconds.
In practice, it usually sleeps for "max" microseconds. This is for power optimization purposes so that CPUs need to wake up less often (the idea is that if it sleeps for longer there's a better chance that another wakeup will happen and wake us up anyway).
At boot time we really care about speed, not about power consumption. Also: there are a lot of delays (some using usleep_range()) at bootup. In the past, we saved hundreds of milliseconds by tuning usleep_range() in dwc2, though that was probably an extreme case.
It would be interesting to see how much boot speed would improve if we changed usleep_range() to always use the minimum during bootup (maybe stop doing it at late_initcall, like clk_disable_unused?).
Note: with async probe the benefit might be less than it was historically, but it still might be interesting?
Hrmmm. Maybe not useful on kevin, though. Doing some quick checking w/ printouts shows a maximum of 6 ms gained on my kevin. :( I guess there's nobody doing things as stupid as:
usleep_range(100000, 150000);
Comment 1 by sheriffbot@chromium.org
, Nov 2 2017Status: Untriaged (was: Available)