summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@nvidia.com>2011-06-07 15:24:49 +0900
committerRohan Somvanshi <rsomvanshi@nvidia.com>2011-06-21 10:03:37 -0700
commit88d6c27b5fb6122cfe21aa360c417f675f5f2797 (patch)
treef8419d0f53d1b352645e4bc903f43be59afe98a7 /drivers
parent0243fdea9bd5410e8a690abba82711ec49618f39 (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. Change-Id: Ida9585ecb4fcc9a88786131a1b629905efd1a07a Reviewed-on: http://git-master/r/35592 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Diffstat (limited to 'drivers')
-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 c254eac4dcc5..8ae3172af678 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -1009,6 +1009,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) {