USB: Minimize delays involved in root hub initialization during HNP

Host controller driver may register root hub during HNP while
becoming B-Host.  Remove delays involved in debouncing and
applying port power.  This helps B-device to meet TB_ACON_BSE0
timing parameter and A-device will not find bus idle for longer
than TA_BIDL_ADIS.

Change-Id: Ib5df6417b10c6bde5bf5b9fd688c13a305ce7a4d
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
This commit is contained in:
Pavankumar Kondeti 2010-07-23 17:32:15 +05:30 committed by Stephen Boyd
parent fe3d23c965
commit 55d54f82f1
1 changed files with 9 additions and 0 deletions

View File

@ -1060,6 +1060,10 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
*/
if (type == HUB_INIT) {
delay = hub_power_on(hub, false);
#ifdef CONFIG_USB_OTG
if (hdev->bus->is_b_host)
goto init2;
#endif
PREPARE_DELAYED_WORK(&hub->init_work, hub_init_func2);
schedule_delayed_work(&hub->init_work,
msecs_to_jiffies(delay));
@ -1207,6 +1211,11 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
* will see them later and handle them normally.
*/
if (need_debounce_delay) {
#ifdef CONFIG_USB_OTG
if (hdev->bus->is_b_host && type == HUB_INIT)
goto init3;
#endif
delay = HUB_DEBOUNCE_STABLE;
/* Don't do a long sleep inside a workqueue routine */