diff options
| author | Wolfgang Denk <wd@denx.de> | 2010-11-26 21:52:52 +0100 |
|---|---|---|
| committer | Wolfgang Denk <wd@denx.de> | 2010-11-26 21:52:52 +0100 |
| commit | d4752d5d2c6b240637a51a2f111b1b1a318fb0bf (patch) | |
| tree | 70f78b1eadbd6d4ac1f4e7b8b25955da64754a16 /drivers/usb/host/ehci-hcd.c | |
| parent | 50e2df374952549fb378fd342eebeb8afd1103f5 (diff) | |
| parent | fc90c06cac1966ca3a4e5826cf795996882d1095 (diff) | |
| download | olio-uboot-2014.01-d4752d5d2c6b240637a51a2f111b1b1a318fb0bf.tar.xz olio-uboot-2014.01-d4752d5d2c6b240637a51a2f111b1b1a318fb0bf.zip | |
Merge branch 'master' of /home/wd/git/u-boot/custodians
Diffstat (limited to 'drivers/usb/host/ehci-hcd.c')
| -rw-r--r-- | drivers/usb/host/ehci-hcd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 982f96e8b..6eb38a413 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -25,6 +25,7 @@ #include <usb.h> #include <asm/io.h> #include <malloc.h> +#include <watchdog.h> #include "ehci.h" @@ -229,7 +230,7 @@ static int ehci_reset(void) int ret = 0; cmd = ehci_readl(&hcor->or_usbcmd); - cmd |= CMD_RESET; + cmd = (cmd & ~CMD_RUN) | CMD_RESET; ehci_writel(&hcor->or_usbcmd, cmd); ret = handshake((uint32_t *)&hcor->or_usbcmd, CMD_RESET, 0, 250 * 1000); if (ret < 0) { @@ -452,6 +453,7 @@ ehci_submit_async(struct usb_device *dev, unsigned long pipe, void *buffer, token = hc32_to_cpu(vtd->qt_token); if (!(token & 0x80)) break; + WATCHDOG_RESET(); } while (get_timer(ts) < CONFIG_SYS_HZ); /* Disable async schedule. */ @@ -491,6 +493,8 @@ ehci_submit_async(struct usb_device *dev, unsigned long pipe, void *buffer, break; default: dev->status = USB_ST_CRC_ERR; + if ((token & 0x40) == 0x40) + dev->status |= USB_ST_STALLED; break; } dev->act_len = length - ((token >> 16) & 0x7fff); |