summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorSuresh Mangipudi <smangipudi@nvidia.com>2011-07-22 12:15:18 +0530
committerVarun Colbert <vcolbert@nvidia.com>2011-07-25 15:13:41 -0700
commitbe9182e70799124f527028e24060cdbac5352176 (patch)
tree9df1d8b19a2c7b5919b24888194e889862d912ff /drivers/usb
parent4a63f22f1a19152be0840ccf5bb8742180f7e002 (diff)
usb: ehci: tegra: Enable/disable usb clock
Disable usb clock when no cable is connected. Bug 829628, 849248 Reviewed-on: http://git-master/r/39353 (cherry picked from commit 6a78f2d2e72a2a5f20b784c0efc4917ece4776c5) Change-Id: I94d954d735226341095d7161b8dce3888f2d31a2 Reviewed-on: http://git-master/r/42546 Reviewed-by: Suresh Mangipudi <smangipudi@nvidia.com> Tested-by: Suresh Mangipudi <smangipudi@nvidia.com> Reviewed-by: Rakesh Bodla <rbodla@nvidia.com> Reviewed-by: Hanumanth Venkateswa Moganty <vmoganty@nvidia.com>
Diffstat (limited to 'drivers/usb')
-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 028070a76fed..359c3036bdb5 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -65,6 +65,9 @@ static void tegra_ehci_power_up(struct usb_hcd *hcd, bool is_dpd)
{
struct tegra_ehci_hcd *tegra = dev_get_drvdata(hcd->self.controller);
+#ifndef CONFIG_USB_HOTPLUG
+ clk_enable(tegra->clk);
+#endif
tegra_usb_phy_power_on(tegra->phy, is_dpd);
tegra->host_resumed = 1;
}
@@ -75,6 +78,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
}
static irqreturn_t tegra_ehci_irq (struct usb_hcd *hcd)