Skip to content
Snippets Groups Projects
Commit 835a5559 authored by Roger Quadros's avatar Roger Quadros Committed by Tom Rini
Browse files

usb: ehci-omap: Reset the USB Host OMAP module


In commit bb1f327d we removed the UHH reset to fix NFS root (over usb
ethernet) problems with Beagleboard (3530 ES1.0). However, this
seems to cause USB detection problems for Pandaboard, about (3/8).

On further investigation, it seems that doing the UHH reset is not
the cause of the original Beagleboard problem, but in the way the reset
was done.

This patch adds proper UHH RESET mechanism for OMAP3 and OMAP4/5 based
on the UHH_REVISION register. This should fix the Beagleboard NFS
problem as well as the Pandaboard USB detection problem.

Reported-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
CC: Stefan Roese <sr@denx.de>
Reviewed-by: default avatarStefan Roese <sr@denx.de>
Signed-off-by: default avatarRoger Quadros <rogerq@ti.com>
parent f33b9bd3
No related branches found
No related tags found
No related merge requests found
...@@ -28,21 +28,48 @@ static struct omap_ehci *const ehci = (struct omap_ehci *)OMAP_EHCI_BASE; ...@@ -28,21 +28,48 @@ static struct omap_ehci *const ehci = (struct omap_ehci *)OMAP_EHCI_BASE;
static int omap_uhh_reset(void) static int omap_uhh_reset(void)
{ {
/* int timeout = 0;
* Soft resetting the UHH module causes instability issues on u32 rev;
* all OMAPs so we just avoid it.
* rev = readl(&uhh->rev);
* See OMAP36xx Errata
* i571: USB host EHCI may stall when entering smart-standby mode /* Soft RESET */
* i660: USBHOST Configured In Smart-Idle Can Lead To a Deadlock writel(OMAP_UHH_SYSCONFIG_SOFTRESET, &uhh->sysc);
*
* On OMAP4/5, soft-resetting the UHH module will put it into switch (rev) {
* Smart-Idle mode and lead to a deadlock. case OMAP_USBHS_REV1:
* /* Wait for soft RESET to complete */
* On OMAP3, this doesn't seem to be the case but still instabilities while (!(readl(&uhh->syss) & 0x1)) {
* are observed on beagle (3530 ES1.0) if soft-reset is used. if (timeout > 100) {
* e.g. NFS root failures with Linux kernel. printf("%s: RESET timeout\n", __func__);
*/ return -1;
}
udelay(10);
timeout++;
}
/* Set No-Idle, No-Standby */
writel(OMAP_UHH_SYSCONFIG_VAL, &uhh->sysc);
break;
default: /* Rev. 2 onwards */
udelay(2); /* Need to wait before accessing SYSCONFIG back */
/* Wait for soft RESET to complete */
while ((readl(&uhh->sysc) & 0x1)) {
if (timeout > 100) {
printf("%s: RESET timeout\n", __func__);
return -1;
}
udelay(10);
timeout++;
}
writel(OMAP_UHH_SYSCONFIG_VAL, &uhh->sysc);
break;
}
return 0; return 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment