]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
ARM: tegra: phy:Disable PMC when driver unregister
authorRakesh Bodla <rbodla@nvidia.com>
Tue, 5 Mar 2013 15:27:51 +0000 (20:57 +0530)
committerDan Willemsen <dwillemsen@nvidia.com>
Sat, 14 Sep 2013 20:02:38 +0000 (13:02 -0700)
PMC should be disabled while unregistering
the driver.

Bug 1246325

Change-Id: I8eb51f0fd3596af524cf8c3b56acbdb58bb00402
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/206346
(cherry picked from commit 81d083d71480126be3320954c95c1482c5d9bbc5)
Reviewed-on: http://git-master/r/208753
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
drivers/usb/phy/tegra3_usb_phy.c

index c220c0549399993a39b84a0f07eb4e730e3ddbbe..99e52bde7a96bfa2be4f1cc5bde8a310ec18846c 100644 (file)
@@ -1157,6 +1157,7 @@ static void utmi_phy_close(struct tegra_usb_phy *phy)
 {
        unsigned long val;
        void __iomem *base = phy->regs;
+       void __iomem *pmc_base = IO_ADDRESS(TEGRA_PMC_BASE);
 
        DBG("%s inst:[%d]\n", __func__, phy->inst);
 
@@ -1167,6 +1168,10 @@ static void utmi_phy_close(struct tegra_usb_phy *phy)
                writel(val, base + USB_SUSP_CTRL);
        }
 
+       val = readl(pmc_base + PMC_SLEEP_CFG);
+       if (val & UTMIP_MASTER_ENABLE(phy->inst))
+               utmip_phy_disable_pmc_bus_ctrl(phy);
+
        clk_put(phy->utmi_pad_clk);
 }