diff options
author | Suresh Mangipudi <smangipudi@nvidia.com> | 2011-09-30 16:17:40 +0530 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2011-10-21 14:04:38 -0700 |
commit | efd628d15d4be1355c3eb4318935083149028a98 (patch) | |
tree | 3cbaf3941fefa9a921c98a23f9a7c822779059ac /arch | |
parent | 38dc376fc332bdc34a9ee9fd9385fd447a0f343d (diff) |
tegra: usb: phy: usb trigger change for wakeup event
Change the trigger for the wake events. The WAKE_ON_CONNECT bit should not
be cleared until the PCD_STS bit is set.
Bug 881388
Change-Id: I88d557a374ed3e20ebf434e1319beebf4498448c
Reviewed-on: http://git-master/r/55436
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-tegra/usb_phy.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/arm/mach-tegra/usb_phy.c b/arch/arm/mach-tegra/usb_phy.c index 4d9765cb65ee..9a8085f6aa9e 100644 --- a/arch/arm/mach-tegra/usb_phy.c +++ b/arch/arm/mach-tegra/usb_phy.c @@ -398,6 +398,7 @@ #define WAKE_VAL_FSJ 0x2 #define WAKE_VAL_FSK 0x1 #define WAKE_VAL_SE0 0x0 +#define WAKE_VAL_ANY 0xf #define PMC_SLEEP_CFG 0x1fc #define UTMIP_TCTRL_USE_PMC(inst) (1 << ((8*(inst))+3)) @@ -1288,10 +1289,7 @@ static void utmip_setup_pmc_wake_detect(struct tegra_usb_phy *phy) /* Turn over pad configuration to PMC for line wake events*/ val = readl(pmc_base + PMC_SLEEP_CFG); val &= ~UTMIP_WAKE_VAL(inst, ~0); - if (port_speed == TEGRA_USB_PHY_PORT_SPEED_LOW) - val |= UTMIP_WAKE_VAL(inst, WAKE_VAL_FSJ); - else - val |= UTMIP_WAKE_VAL(inst, WAKE_VAL_FSK); + val |= UTMIP_WAKE_VAL(inst, WAKE_VAL_ANY); val |= UTMIP_RCTRL_USE_PMC(inst) | UTMIP_TCTRL_USE_PMC(inst); val |= UTMIP_MASTER_ENABLE(inst) | UTMIP_FSLS_USE_PMC(inst); writel(val, pmc_base + PMC_SLEEP_CFG); @@ -1583,8 +1581,11 @@ static void utmi_phy_restore_end(struct tegra_usb_phy *phy) do { val = readl(base + USB_PORTSC1); udelay(1); - if (wait_time_us == 0) + if (wait_time_us == 0) { + utmip_phy_disable_pmc_bus_ctrl(phy); + tegra_usb_phy_postresume(phy, false); return; + } wait_time_us--; } while (!(val & USB_PORTSC1_RESUME)); /* disable PMC master control */ |