summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSuresh Mangipudi <smangipudi@nvidia.com>2011-04-12 19:40:35 +0530
committerVarun Colbert <vcolbert@nvidia.com>2011-05-02 18:04:23 -0700
commite6354059de6a1231bf340753657bbb4ef16c17a0 (patch)
tree635a37f9bb68632c38d6b29f184c4225689b2e46 /drivers
parent9c4eac8a44eef360c2e5be07838fecc78096847f (diff)
usb: host: tegra: PORTSC.SUSP needs a delay
Delay of 4ms is needed after the SUSPEND bit in the PORTSC register is programmed. The hardware would be set only after 4ms of delay. Bug 812427 Change-Id: I5253928264112b429f78e6682e261a44820811db Reviewed-on: http://git-master/r/27510 Reviewed-on: http://git-master/r/29974 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: Suresh Mangipudi <smangipudi@nvidia.com> Tested-by: Suresh Mangipudi <smangipudi@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/host/ehci-tegra.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index 184c1783d6c7..a81046b93af7 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -127,6 +127,8 @@ static int tegra_ehci_hub_control(
temp &= ~PORT_WKCONN_E;
temp |= PORT_WKDISC_E | PORT_WKOC_E;
ehci_writel(ehci, temp | PORT_SUSPEND, status_reg);
+ /* Need a 4ms delay before the controller goes to suspend */
+ mdelay(4);
/*
* If a transaction is in progress, there may be a delay in
@@ -411,6 +413,8 @@ static int tegra_usb_resume(struct usb_hcd *hcd)
if ((val & PORT_POWER) && (val & PORT_PE)) {
val |= PORT_SUSPEND;
writel(val, &hw->port_status[0]);
+ /* Need a 4ms delay before the controller goes to suspend */
+ mdelay(4);
/* Wait until port suspend completes */
if (handshake(ehci, &hw->port_status[0], PORT_SUSPEND,