summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/tegra3_usb_phy.c
diff options
context:
space:
mode:
authorVinayak Pane <vpane@nvidia.com>2012-06-11 18:08:14 -0700
committerSimone Willett <swillett@nvidia.com>2012-07-16 19:14:52 -0700
commit60cd13b6f1bfa4fb808add87d225d8373f4cf3f8 (patch)
tree3a5d9508507cb4c0caeb5eefdef60d8bdede41b6 /arch/arm/mach-tegra/tegra3_usb_phy.c
parent57a9b767fb2ae5575c6b5c3bbe290cce2501711b (diff)
arm: tegra: usb_phy: fix hsic suspend issue on xmm
XMM modem fails at auto-suspend on hsic. Fixing this issue by enabling PMC sleepwalk code conditionally and only at phy-on and phy-off routines. Bug 991709 Signed-off-by: Vinayak Pane <vpane@nvidia.com> Reviewed-on: http://git-master/r/109324 (cherry picked from commit 100f818a16ce97411a98ddb0e2c5c9e73a9e654a) Change-Id: If6f92b8b36f856fa633cb411ac20dbe6e862890c Reviewed-on: http://git-master/r/115612 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/tegra3_usb_phy.c')
-rw-r--r--arch/arm/mach-tegra/tegra3_usb_phy.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/arch/arm/mach-tegra/tegra3_usb_phy.c b/arch/arm/mach-tegra/tegra3_usb_phy.c
index 874bb1325a22..57c270caba73 100644
--- a/arch/arm/mach-tegra/tegra3_usb_phy.c
+++ b/arch/arm/mach-tegra/tegra3_usb_phy.c
@@ -1997,6 +1997,7 @@ static void uhsic_phy_restore_start(struct tegra_usb_phy *phy)
/* check whether we wake up from the remote resume */
if (UHSIC_WALK_PTR_VAL & val) {
phy->remote_wakeup = true;
+ pr_info("%s: uhsic remote wakeup detected\n", __func__);
} else {
if (!((UHSIC_STROBE_VAL_P0 | UHSIC_DATA_VAL_P0) & val)) {
uhsic_phy_disable_pmc_bus_ctrl(phy);
@@ -2198,6 +2199,15 @@ static int uhsic_phy_power_on(struct tegra_usb_phy *phy)
phy->phy_clk_on = true;
phy->hw_accessible = true;
+ if (phy->pmc_sleepwalk) {
+ DBG("%s(%d) inst:[%d] restore phy\n", __func__, __LINE__,
+ phy->inst);
+ uhsic_phy_restore_start(phy);
+ usb_phy_bringup_host_controller(phy);
+ uhsic_phy_restore_end(phy);
+ phy->pmc_sleepwalk = false;
+ }
+
return 0;
}
@@ -2219,7 +2229,10 @@ static int uhsic_phy_power_off(struct tegra_usb_phy *phy)
/* Disable interrupts */
writel(0, base + USB_USBINTR);
- uhsic_setup_pmc_wake_detect(phy);
+ if (phy->pmc_sleepwalk == false) {
+ uhsic_setup_pmc_wake_detect(phy);
+ phy->pmc_sleepwalk = true;
+ }
val = readl(base + HOSTPC1_DEVLC);
val |= HOSTPC1_DEVLC_PHCD;
@@ -2368,10 +2381,6 @@ int uhsic_phy_resume(struct tegra_usb_phy *phy)
{
DBG("%s(%d) inst:[%d]\n", __func__, __LINE__, phy->inst);
- uhsic_phy_restore_start(phy);
- usb_phy_bringup_host_controller(phy);
- uhsic_phy_restore_end(phy);
-
return 0;
}