summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-03-13 13:35:05 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2012-04-12 21:38:19 +0200
commitf70ebb28a2ae0cbfdd41dee8d55ec51b8e549986 (patch)
tree6ede4460ada3a26afba69105a8e824f2b514c9a9 /drivers
parent1db7717f6b2766624c9a1216fe67361245e6c59c (diff)
downloadbarebox-f70ebb28a2ae0cbfdd41dee8d55ec51b8e549986.tar.gz
barebox-f70ebb28a2ae0cbfdd41dee8d55ec51b8e549986.tar.xz
USB ehci: speed up initialization
This is based on the following U-Boot commit: commit 5f4b4f2fed3ab8590c8c06b78642f8c1467acacf Author: Vincent Palatin <vpalatin@chromium.org> Date: Mon Dec 5 14:52:22 2011 -0800 ehci: speed up initialization According to EHCI specification v1.0, the controller should stabilize the power on a port at most 20 ms after the port power bit transition. So, we put this setting in the virtual descriptor corresponding field, (bPwrOn2PwrGood = 10 => 10 x 2ms = 20ms), this saves about 500ms at each controller initialization/enumeration. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/core/usb.c2
-rw-r--r--drivers/usb/host/ehci-hcd.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index 7039a2cb75..ba23e0e3a0 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -934,8 +934,8 @@ static void usb_hub_power_on(struct usb_hub_device *hub)
for (i = 0; i < dev->maxchild; i++) {
usb_set_port_feature(dev, i + 1, USB_PORT_FEAT_POWER);
USB_HUB_PRINTF("port %d returns %lX\n", i + 1, dev->status);
- wait_ms(hub->desc.bPwrOn2PwrGood * 2);
}
+ mdelay(20);
}
#define MAX_TRIES 5
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 505d919701..ae2b41ed53 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -64,7 +64,7 @@ static struct descriptor {
0x29, /* bDescriptorType: hub descriptor */
2, /* bNrPorts -- runtime modified */
0, /* wHubCharacteristics */
- 0xff, /* bPwrOn2PwrGood */
+ 10, /* bPwrOn2PwrGood */
0, /* bHubCntrCurrent */
{}, /* Device removable */
{} /* at most 7 ports! XXX */