usb: otg: tegra: let the usb clock stabilize
authorPrashant Gaikwad <pgaikwad@nvidia.com>
Wed, 13 Apr 2011 05:14:47 +0000 (10:44 +0530)
committerVarun Colbert <vcolbert@nvidia.com>
Thu, 14 Apr 2011 01:04:53 +0000 (18:04 -0700)
add sleep to let the clock stabilize before handling interrupt.

Bug 814888

Change-Id: I7983017f04ad8b84eb6def0f4f7c580292e6e374
Reviewed-on: http://git-master/r/27592
Tested-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
drivers/usb/otg/tegra-otg.c

index 4e40d14f57cf1a9781851aa679b4f0d96c824247..386bb8b922da9874a29433110bf45413c7c79bb5 100644 (file)
@@ -401,6 +401,11 @@ static int tegra_otg_resume(struct platform_device * pdev)
 
        tegra_otg_enable_clk();
 
+       /* Following delay is intentional.
+        * It is placed here after observing system hang.
+        * Root cause is not confirmed.
+        */
+       msleep(1);
        /* restore the interupt enable for cable ID and VBUS */
        clk_enable(tegra_otg->clk);
        writel(tegra_otg->intr_reg_data, (tegra_otg->regs + USB_PHY_WAKEUP));