diff options
author | Marek Vasut <marek.vasut@gmail.com> | 2011-07-11 00:37:01 +0200 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2014-04-16 10:20:42 +0200 |
commit | bfdae04de981c841c33f65452ca0613e373bbdf1 (patch) | |
tree | 68c1eda116c468a37db6ac044866b612183219d6 /drivers | |
parent | ccd521c4681a5850bbec1feec140eeaec33936b0 (diff) |
USB: EHCI: Allow EHCI post-powerup configuration in board files
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.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index db7230a4349..aa10478deb1 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -212,6 +212,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) +{ + wait_ms(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; @@ -782,8 +790,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, ®); + ehci_writel(status_reg, reg & ~EHCI_PS_PR); /* * A host controller must terminate the reset |