From 6399f339601cee0f39e48011265d0e324e7dd99e Mon Sep 17 00:00:00 2001 From: Krishna Yarlagadda Date: Tue, 14 Aug 2012 21:36:59 +0530 Subject: ARM: tegra: usb: handle device connect in lp0 When a otg cable is connected along with device during lp0 system will wakeup but might not complete device enumeration before going back to lp0. In this case we have to handle pmc disable. Bug 1024456 Change-Id: I9acbf434e58776c3d58de1b28d442d6b20b256d0 Signed-off-by: Krishna Yarlagadda Reviewed-on: http://git-master/r/123383 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Venkat Moganty --- arch/arm/mach-tegra/tegra3_usb_phy.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'arch/arm/mach-tegra/tegra3_usb_phy.c') diff --git a/arch/arm/mach-tegra/tegra3_usb_phy.c b/arch/arm/mach-tegra/tegra3_usb_phy.c index af9eaab782c7..b02e9b646284 100644 --- a/arch/arm/mach-tegra/tegra3_usb_phy.c +++ b/arch/arm/mach-tegra/tegra3_usb_phy.c @@ -1657,11 +1657,11 @@ static void utmi_phy_restore_start(struct tegra_usb_phy *phy) if (UTMIP_WALK_PTR_VAL(inst) & val) { phy->remote_wakeup = true; } else if(!phy->remote_wakeup) { - if (!((UTMIP_USBON_VAL(phy->inst) | - UTMIP_USBOP_VAL(phy->inst)) & val)) { - utmip_phy_disable_pmc_bus_ctrl(phy); - } + val = readl(pmc_base + PMC_SLEEP_CFG); + if (val & UTMIP_MASTER_ENABLE(inst)) + utmip_phy_disable_pmc_bus_ctrl(phy); } + utmi_phy_enable_obs_bus(phy); } -- cgit v1.2.3