summaryrefslogtreecommitdiff
path: root/common/usb_hub.c
diff options
context:
space:
mode:
authorKuo-Jung Su <dantesu@faraday-tech.com>2013-05-15 15:29:22 +0800
committerMarek Vasut <marex@denx.de>2013-06-12 22:22:51 +0200
commitaa1550588cc60549bf3a97dc6dccb7de4c022aa6 (patch)
tree650492a00e6157d45caba48bb1320e52b555a1a3 /common/usb_hub.c
parent1dde1423ad341b5d157ed7ee1f1b136f4ee7dbb4 (diff)
downloadu-boot-aa1550588cc60549bf3a97dc6dccb7de4c022aa6.tar.gz
u-boot-aa1550588cc60549bf3a97dc6dccb7de4c022aa6.tar.bz2
u-boot-aa1550588cc60549bf3a97dc6dccb7de4c022aa6.zip
usb: hub: make minimum power-on delay configurable
This patch makes the minimum power-on delay for USB HUB become configurable. The original design waits at least 100 msec here, but some EHCI controlers(e.g. Faraday EHCI) are known to require much longer delay interval. Signed-off-by: Kuo-Jung Su <dantesu@faraday-tech.com> CC: Marek Vasut <marex@denx.de>
Diffstat (limited to 'common/usb_hub.c')
-rw-r--r--common/usb_hub.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/common/usb_hub.c b/common/usb_hub.c
index 0d79ec3ea8..fc3a8c1770 100644
--- a/common/usb_hub.c
+++ b/common/usb_hub.c
@@ -53,6 +53,10 @@
#include <asm/4xx_pci.h>
#endif
+#ifndef CONFIG_USB_HUB_MIN_POWER_ON_DELAY
+#define CONFIG_USB_HUB_MIN_POWER_ON_DELAY 100
+#endif
+
#define USB_BUFSIZ 512
static struct usb_hub_device hub_dev[USB_MAX_HUB];
@@ -148,8 +152,8 @@ static void usb_hub_power_on(struct usb_hub_device *hub)
debug("port %d returns %lX\n", i + 1, dev->status);
}
- /* Wait at least 100 msec for power to become stable */
- mdelay(max(pgood_delay, (unsigned)100));
+ /* Wait for power to become stable */
+ mdelay(max(pgood_delay, CONFIG_USB_HUB_MIN_POWER_ON_DELAY));
}
void usb_hub_reset(void)