usb: host: tegra: Add a short delay before the controller suspends.
Mike Corrigan [Mon, 20 Jun 2011 20:36:18 +0000 (15:36 -0500)]
Submission from Jay Cheng <jacheng@nvidia.com>.

Change-Id: Ic92befe618adc7bdd12c35374fb3f855d7f6a515
Signed-off-by: Mike Corrigan <michael.corrigan@motorola.com>

drivers/usb/host/ehci-tegra.c

index c1b4e4b..612f810 100644 (file)
@@ -180,6 +180,9 @@ static int tegra_ehci_hub_control(
                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
                 * suspending the port. Poll until the port is suspended.
@@ -375,6 +378,9 @@ static int tegra_usb_resume(struct usb_hcd *hcd)
                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,
                                                         PORT_SUSPEND, 1000)) {