summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrashant Gaikwad <pgaikwad@nvidia.com>2011-07-01 14:31:02 +0530
committerManish Tuteja <mtuteja@nvidia.com>2011-07-05 10:35:27 -0700
commit6a78f2d2e72a2a5f20b784c0efc4917ece4776c5 (patch)
treedf58822ac2975d556ffa45a7ef91fd66aa79af4f
parent9f5bb3ae0980f8dc71cc2934ca27e53d0b47060d (diff)
usb: ehci: tegra: Enable/disable usb clock
Disable usb clock when no cable is connected. Bug 829628 Change-Id: Idabe72093ae1fc1a236b0173da93813f07f3501c Reviewed-on: http://git-master/r/39353 Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com> Tested-by: Prashant Gaikwad <pgaikwad@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: Suresh Mangipudi <smangipudi@nvidia.com>
-rw-r--r--drivers/usb/host/ehci-tegra.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index c254eac4dcc5..e5cc0971a313 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -64,6 +64,9 @@ static void tegra_ehci_power_up(struct usb_hcd *hcd, bool is_dpd)
clk_enable(tegra->emc_clk);
clk_enable(tegra->sclk_clk);
+#ifndef CONFIG_USB_HOTPLUG
+ clk_enable(tegra->clk);
+#endif
tegra_usb_phy_power_on(tegra->phy, is_dpd);
tegra->host_resumed = 1;
}
@@ -74,6 +77,9 @@ static void tegra_ehci_power_down(struct usb_hcd *hcd, bool is_dpd)
tegra->host_resumed = 0;
tegra_usb_phy_power_off(tegra->phy, is_dpd);
+#ifndef CONFIG_USB_HOTPLUG
+ clk_disable(tegra->clk);
+#endif
clk_disable(tegra->emc_clk);
clk_disable(tegra->sclk_clk);
}