diff options
author | Tom Rini <trini@ti.com> | 2013-06-12 16:33:49 -0400 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-06-12 16:33:49 -0400 |
commit | b7ab8b8ff092ab8214eeb86e8a79573154f448b9 (patch) | |
tree | 0594417cbd3052fd0232d0b967c7bb240e374df9 /common/usb_hub.c | |
parent | 077becc345717c3cf32e88316298b74d0cff6581 (diff) | |
parent | c67b0e42a59c7ef15495bfde006398abaf2f562f (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-usb
Diffstat (limited to 'common/usb_hub.c')
-rw-r--r-- | common/usb_hub.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/common/usb_hub.c b/common/usb_hub.c index 0d79ec3ea84..774ba6387aa 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) @@ -485,7 +489,11 @@ static int usb_hub_configure(struct usb_device *dev) i + 1, portstatus); usb_clear_port_feature(dev, i + 1, USB_PORT_FEAT_C_ENABLE); - + /* + * The following hack causes a ghost device problem + * to Faraday EHCI + */ +#ifndef CONFIG_USB_EHCI_FARADAY /* EM interference sometimes causes bad shielded USB * devices to be shutdown by the hub, this hack enables * them again. Works at least with mouse driver */ @@ -497,6 +505,7 @@ static int usb_hub_configure(struct usb_device *dev) "re-enabling...\n", i + 1); usb_hub_port_connect_change(dev, i); } +#endif } if (portstatus & USB_PORT_STAT_SUSPEND) { debug("port %d suspend change\n", i + 1); |