summaryrefslogtreecommitdiff
path: root/drivers/usb/host/ehci-tegra.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/ehci-tegra.c')
-rw-r--r--drivers/usb/host/ehci-tegra.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index a67a5276b662..a53963ee46d3 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -612,6 +612,11 @@ static int tegra_ehci_bus_suspend(struct usb_hcd *hcd)
u32 port_status;
int error_status = 0;
+ mutex_lock(&tegra->tegra_ehci_hcd_mutex);
+ /* ehci_shutdown touches the USB controller registers, make sure
+ * controller has clocks to it */
+ if (!tegra->host_resumed)
+ tegra_ehci_power_up(hcd, false);
error_status = ehci_bus_suspend(hcd);
if (!error_status && tegra->power_down_on_bus_suspend) {
port_status = ehci_readl(ehci, &ehci->regs->port_status[0]);
@@ -621,6 +626,7 @@ static int tegra_ehci_bus_suspend(struct usb_hcd *hcd)
}
}
tegra_usb_phy_postsuspend(tegra->phy, false);
+ mutex_unlock(&tegra->tegra_ehci_hcd_mutex);
return error_status;
}