summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@nvidia.com>2011-06-07 15:24:49 +0900
committerNiket Sirsi <nsirsi@nvidia.com>2011-07-26 15:40:12 -0700
commit2e94a455f79519e924609f7197ed93eafce47552 (patch)
tree035b68bc2ec008340b3dc89df5abd985e7a0a97a
parent0815697cdcd10d2aab9af6b55c12a23370f6b6a2 (diff)
tegra: usb: fix ehci suspend in host mode
When suspend is called and usb1 is in host mode, tegra_hci_remove is invoked to remove the device. However, at this time it is likely that runtime PM will have powered off usb1. This patch ensures usb1 is powered on if necessary within tegra_hci_remove so that ehci controller registers can be manipulated. Bug 835677. (cherry picked from commit 3a3535c5f95596ecfc9b06c2eb088bfccd062c24) Change-Id: I4096a85f49abee8021a824ba52507294ad57c353 Reviewed-on: http://git-master/r/39616 Reviewed-by: Niket Sirsi <nsirsi@nvidia.com> Tested-by: Niket Sirsi <nsirsi@nvidia.com>
-rw-r--r--drivers/usb/host/ehci-tegra.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index 8190d8235e0c..116b0806af03 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -1015,6 +1015,9 @@ static int tegra_ehci_remove(struct platform_device *pdev)
if (tegra == NULL || hcd == NULL)
return -EINVAL;
+ /* make sure controller is on as we will touch its registers */
+ if (!tegra->host_resumed)
+ tegra_ehci_power_up(hcd, true);
#ifdef CONFIG_USB_OTG_UTILS
if (tegra->transceiver) {