tegra: usb_phy: increase delay for stable line values
Rakesh Bodla [Fri, 6 Jan 2012 05:20:09 +0000 (10:20 +0530)]
Increase the delay before usb detectors for stable
line values.

Bug 882441

Change-Id: I64b0a34f06948f3283188fdc22e6d0075ce044d6
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/73385
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
(cherry picked from commit 6de4bf955bf4af7bbd0e9bf5d69b5b425d7cb000)
Reviewed-on: http://git-master/r/73953
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

arch/arm/mach-tegra/usb_phy.c

index bc18395..5f7d3b6 100644 (file)
 #define   UTMIP_XCVR_SETUP_MSB(x)              (((x) & 0x7) << 22)
 #define   UTMIP_XCVR_HSSLEW_MSB(x)             (((x) & 0x7f) << 25)
 
-#define UTMIP_XCVR_MAX_OFFSET          5
+#define UTMIP_XCVR_MAX_OFFSET          2
 #define UTMIP_XCVR_SETUP_MAX_VALUE     0x7f
 #define XCVR_SETUP_MSB_CALIB(x)        ((x) >> 4)
 
@@ -893,7 +893,7 @@ static void vbus_disable(struct tegra_usb_phy *phy)
 static void utmip_phy_enable_trking_data(struct tegra_usb_phy *phy)
 {
        void __iomem *base = phy->pad_regs;
-       void __iomem *pmc_base = IO_ADDRESS(TEGRA_USB_BASE);
+       void __iomem *pmc_base = IO_ADDRESS(TEGRA_PMC_BASE);
        static bool init_done = false;
        u32 val;
 
@@ -1277,7 +1277,7 @@ static void utmip_setup_pmc_wake_detect(struct tegra_usb_phy *phy)
        writel(val, pmc_base + PMC_USB_AO);
 
        /* Add small delay before usb detectors provide stable line values */
-       udelay(1);
+       mdelay(1);
 
        /* Program thermally encoded RCTRL_VAL, TCTRL_VAL into PMC space */
        val = readl(pmc_base + PMC_UTMIP_TERM_PAD_CFG);