ARM: tegra: usb_phy: Fix terminiation delay for NvCharger
Rohith Seelaboyina [Tue, 5 Feb 2013 10:03:59 +0000 (15:03 +0530)]
Increase termination delay to stabilize the line status

Bug 1225941

Change-Id: Iee3b4eb80e01269e16326a9d6795938e3c8949ae
Signed-off-by: Rohith Seelaboyina <rseelaboyina@nvidia.com>
Reviewed-on: http://git-master/r/195532
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

arch/arm/mach-tegra/tegra11x_usb_phy.c

index 388f6cc..0d2a9a5 100644 (file)
@@ -1823,7 +1823,8 @@ static bool utmi_phy_nv_charger_detect(struct tegra_usb_phy *phy)
                        | FORCE_PULLDN_DP | DISABLE_PULLDN_DM);
        writel(val, base + UTMIP_MISC_CFG0);
 
-       udelay(100);
+       /*Wait for 20 ms to turn off terminations and stabilize line satus*/
+       msleep(20);
 
        val = readl(base + USB_PORTSC);
        status = (USB_PORTSC_LINE_STATE(val) == 0);
@@ -1835,7 +1836,7 @@ static bool utmi_phy_nv_charger_detect(struct tegra_usb_phy *phy)
                        | DISABLE_PULLDN_DP | DISABLE_PULLDN_DM);
        writel(val, base + UTMIP_MISC_CFG0);
 
-       udelay(100);
+       msleep(20);
 
        val = readl(base + USB_PORTSC);
        if (status & (USB_PORTSC_LINE_STATE(val) == 0x3)) {