summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@nvidia.com>2011-06-07 15:24:49 +0900
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:47:11 -0800
commit1dff2ab02c4b60be948c5bd0e261a319b729ce83 (patch)
tree5fbe9f13c69446aa2fe6708c5800f0dc14d65fad
parent66096378b33d5796746e16d405c0a47c49f61ebf (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. Reviewed-on: http://git-master/r/35592 (cherry picked from commit 88d6c27b5fb6122cfe21aa360c417f675f5f2797) Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Original-Change-Id: Ifc98ba9cf42a6b09671bb722ff4bdf23798cf1f8 Reviewed-on: http://git-master/r/37985 Reviewed-by: Hanumanth Venkateswa Moganty <vmoganty@nvidia.com> Rebase-Id: R36465ebfda53c2289623259b2202975a2d7522c8
-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 46489cf287b5..877d45a6486a 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -1119,6 +1119,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) {