arm: tegra: usb_phy: utmip remote wakeup issue
Venu Byravarasu [Fri, 29 Jun 2012 06:28:51 +0000 (11:28 +0530)]
Do not clear sleep walk pointer for utmip port after remote
wakeup is detected. This should be cleared after control
is given to USB master from PMC.

Bug 999208

Change-Id: I9f498521989c6421f0043dc1b4364591d4907423
Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
(cherry picked from commit e4dbecfe031cbacd4f22bbbcdf971ab11ad81ee8)
Reviewed-on: http://git-master/r/112938
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

arch/arm/mach-tegra/tegra3_usb_phy.c

index 6a8dc3d..874bb13 100644 (file)
@@ -721,10 +721,6 @@ static void utmip_phy_disable_pmc_bus_ctrl(struct tegra_usb_phy *phy)
        val |= UTMIP_WAKE_VAL(inst, WAKE_VAL_NONE);
        writel(val, pmc_base + PMC_SLEEP_CFG);
 
-       val = readl(pmc_base + PMC_TRIGGERS);
-       val |= UTMIP_CLR_WAKE_ALARM(inst) | UTMIP_CLR_WALK_PTR(inst);
-       writel(val, pmc_base + PMC_TRIGGERS);
-
        val = readl(base + UTMIP_PMC_WAKEUP0);
        val &= ~EVENT_INT_ENB;
        writel(val, base + UTMIP_PMC_WAKEUP0);
@@ -744,6 +740,10 @@ static void utmip_phy_disable_pmc_bus_ctrl(struct tegra_usb_phy *phy)
        val |= (USBOP_VAL_PD(inst) | USBON_VAL_PD(inst));
        writel(val, pmc_base + PMC_USB_AO);
 
+       val = readl(pmc_base + PMC_TRIGGERS);
+       val |= UTMIP_CLR_WALK_PTR(inst);
+       writel(val, pmc_base + PMC_TRIGGERS);
+
        phy->remote_wakeup = false;
        PHY_DBG("%s DISABLE_PMC inst = %d\n", __func__, inst);
 }
@@ -766,8 +766,7 @@ bool utmi_phy_remotewake_detected(struct tegra_usb_phy *phy)
                        writel(val, pmc_base + PMC_SLEEP_CFG);
 
                        val = readl(pmc_base + PMC_TRIGGERS);
-                       val |= UTMIP_CLR_WAKE_ALARM(inst) |
-                               UTMIP_CLR_WALK_PTR(inst);
+                       val |= UTMIP_CLR_WAKE_ALARM(inst);
                        writel(val, pmc_base + PMC_TRIGGERS);
 
                        val = readl(base + UTMIP_PMC_WAKEUP0);