diff options
author | Rama Kandhala <rkandhala@nvidia.com> | 2010-05-14 18:11:43 +0530 |
---|---|---|
committer | Gary King <gking@nvidia.com> | 2010-05-14 14:50:34 -0700 |
commit | e24561a3dd7683174a9828c1d982ed9ba369afef (patch) | |
tree | 5247e3851537d7168bc91a73e0febb4a768282b0 | |
parent | 5739789393f37094e465b1f17ebc962e345757c6 (diff) |
tegra ehci: Shutdown ehci only when host is in operation
During ehci shutdown, the driver accesses the controller registers and
hence it powers up the phy. It is observed that during re-powering as
part of shutdown, there is a hang while accessing ULPI view_port register.
Preventing this by modifying ehci shutdown code to shutdown only when
the ehci is in operation.
Bug 685566
Change-Id: If69a23071c56c8f76c6f3c6615c1b948a452b9ce
Reviewed-on: http://git-master/r/1397
Reviewed-by: Hanumanth Venkateswa Moganty <vmoganty@nvidia.com>
Tested-by: Nitin Ghate <nghate@nvidia.com>
Reviewed-by: Gary King <gking@nvidia.com>
-rwxr-xr-x | drivers/usb/host/ehci-tegra.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index e57abd0c6a3d..c6f16b9a60b0 100755 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c @@ -190,13 +190,14 @@ static void tegra_ehci_restart (struct usb_hcd *hcd) static void tegra_ehci_shutdown (struct usb_hcd *hcd) { - /* ehci_shutdown touches the USB controller registers, make sure - * controller has clocks to it */ - tegra_ehci_power_up(hcd); - /* call ehci shut down */ - ehci_shutdown(hcd); - /* we are ready to shut down, powerdown the phy */ - tegra_ehci_power_down(hcd); + struct ehci_hcd *ehci = hcd_to_ehci(hcd); + + if (ehci->host_resumed) { + /* call ehci shut down */ + ehci_shutdown(hcd); + /* we are ready to shut down, powerdown the phy */ + tegra_ehci_power_down(hcd); + } } /* |