summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@freescale.com>2010-10-18 11:45:19 +0800
committerPeter Chen <peter.chen@freescale.com>2010-10-18 13:23:04 +0800
commit021d31454b7cebff5645702f88bb1834e0441c5a (patch)
tree3a990bbef05a839c64d0d9dbca51e0e4d0fc30b7
parentfcdb748cea254c18e3ca85d4a1d3a2254dda6704 (diff)
ENGR00132536 usb-host: Clock should be opened before calling ehci_shutdown
When trigger "reboot" command, the driver will call xxx_shutdown. For usb-host, it will write registers. So, it needs to open clock before ehci_shutdown if the usb is in low power mode. Signed-off-by: Peter Chen <peter.chen@freescale.com>
-rw-r--r--drivers/usb/host/ehci-arc.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-arc.c b/drivers/usb/host/ehci-arc.c
index 60e11b913e63..3ee0dc4d1a31 100644
--- a/drivers/usb/host/ehci-arc.c
+++ b/drivers/usb/host/ehci-arc.c
@@ -439,6 +439,18 @@ static int ehci_fsl_bus_resume(struct usb_hcd *hcd)
return ret;
}
+static void ehci_fsl_shutdown(struct usb_hcd *hcd)
+{
+ if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) {
+ set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
+ fsl_usb_clk_gate(hcd->self.controller->platform_data, true);
+ }
+ ehci_shutdown(hcd);
+ if (test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) {
+ clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
+ fsl_usb_clk_gate(hcd->self.controller->platform_data, false);
+ }
+}
/* called during probe() after chip reset completes */
static int ehci_fsl_setup(struct usb_hcd *hcd)
@@ -492,7 +504,7 @@ static const struct hc_driver ehci_fsl_hc_driver = {
.reset = ehci_fsl_setup,
.start = ehci_run,
.stop = ehci_stop,
- .shutdown = ehci_shutdown,
+ .shutdown = ehci_fsl_shutdown,
/*
* managing i/o requests and associated device resources