diff options
author | Alexandre Courbot <acourbot@nvidia.com> | 2011-06-07 15:24:49 +0900 |
---|---|---|
committer | Niket Sirsi <nsirsi@nvidia.com> | 2011-06-29 15:34:14 -0700 |
commit | d7cbc8c37cfe9ae9f2c1d13266e1690f2b2e6184 (patch) | |
tree | 4e3c5046340e0c0622628b48fce60ed68b3193ea /drivers/usb/host | |
parent | 09883131d5468c4a3095649b30af3fb38a4969ab (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>
Change-Id: Ifc98ba9cf42a6b09671bb722ff4bdf23798cf1f8
Reviewed-on: http://git-master/r/37985
Reviewed-by: Hanumanth Venkateswa Moganty <vmoganty@nvidia.com>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/ehci-tegra.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index fd85abb9a4fc..eb5f5caa1c91 100644 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c @@ -1045,6 +1045,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) { |