summaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/usb.c
diff options
context:
space:
mode:
authorSteffen Trumtrar <s.trumtrar@pengutronix.de>2012-08-30 14:30:50 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-08-31 09:28:44 +0200
commit7212fa7d4273155aaa0de99ecd4cd040396acb19 (patch)
treea7ee8aac8b74051b3351666d02a889a1f00433ad /drivers/usb/core/usb.c
parent738c57eeaa7958aae6600f6f668fbda8a5128cd4 (diff)
downloadbarebox-7212fa7d4273155aaa0de99ecd4cd040396acb19.tar.gz
barebox-7212fa7d4273155aaa0de99ecd4cd040396acb19.tar.xz
usb: use ep-specific pwrgood delay
In usb_hub_configure the hub is asked for its descriptor and among other things its bPwrOn2PwrGood time. In the actual hub_power_on function this information was not used and a hardcoded value was used instead. For some hubs this delay is to short. So, use the delay the hub wants. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/usb/core/usb.c')
-rw-r--r--drivers/usb/core/usb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index a5075d5436..b4530f1bc5 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -948,7 +948,8 @@ static void usb_hub_power_on(struct usb_hub_device *hub)
usb_set_port_feature(dev, i + 1, USB_PORT_FEAT_POWER);
USB_HUB_PRINTF("port %d returns %lX\n", i + 1, dev->status);
}
- mdelay(20);
+ /* power on is encoded in 2ms increments -> times 2 for the actual delay */
+ mdelay(hub->desc.bPwrOn2PwrGood*2);
}
#define MAX_TRIES 5