summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut@gmail.com>2011-07-11 02:37:01 +0200
committerRemy Bohmer <linux@bohmer.net>2011-12-11 14:50:03 +0100
commit3874b6d674d194c8d34b4f7242337c9f2120ca9a (patch)
tree8766ed3d2085976dd58772d498210cee33ea27d5 /drivers
parent055d969332d511a33c0bce248cf1adf90a51a9fb (diff)
downloadu-boot-imx-3874b6d674d194c8d34b4f7242337c9f2120ca9a.zip
u-boot-imx-3874b6d674d194c8d34b4f7242337c9f2120ca9a.tar.gz
u-boot-imx-3874b6d674d194c8d34b4f7242337c9f2120ca9a.tar.bz2
USB: EHCI: Allow EHCI post-powerup configuration in board files
This patch allows USB to work on some hosts, which need additional frobing after the host was powered up via regular USB powerup sequence. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Remy Bohmer <linux@bohmer.net> Cc: Wolfgang Grandegger <wg@denx.de> Cc: Jason Liu <r64343@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/host/ehci-hcd.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 1cee158..3f7bc2c 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -205,6 +205,14 @@ static inline void ehci_invalidate_dcache(struct QH *qh)
}
#endif /* CONFIG_EHCI_DCACHE */
+void __ehci_powerup_fixup(uint32_t *status_reg, uint32_t *reg)
+{
+ mdelay(50);
+}
+
+void ehci_powerup_fixup(uint32_t *status_reg, uint32_t *reg)
+ __attribute__((weak, alias("__ehci_powerup_fixup")));
+
static int handshake(uint32_t *ptr, uint32_t mask, uint32_t done, int usec)
{
uint32_t result;
@@ -713,8 +721,8 @@ ehci_submit_root(struct usb_device *dev, unsigned long pipe, void *buffer,
* usb 2.0 specification say 50 ms resets on
* root
*/
- wait_ms(50);
- /* terminate the reset */
+ ehci_powerup_fixup(status_reg, &reg);
+
ehci_writel(status_reg, reg & ~EHCI_PS_PR);
/*
* A host controller must terminate the reset