diff options
author | make shi <b15407@freescale.com> | 2012-11-06 15:52:24 +0800 |
---|---|---|
committer | make shi <b15407@freescale.com> | 2012-11-07 13:41:29 +0800 |
commit | fa610478f592b1a65fe170848b9d2226cd32a254 (patch) | |
tree | 89c799d0b59e843e67ac15acd0b5299b2028cdeb /drivers | |
parent | ef23a1e97cc8f48616533cac60d47e7e7dcd3bc4 (diff) |
ENGR00232583 Mx6 USB host: Set HCD_FLAG_HW_ACCESSIBLE flag after clock gate
There is a USB hang issue when do system suspend/resume test with a USB
device plug in. The issue is caused by USB host driver accessing register
when clock is off. Currently set HCD_FLAG_HW_ACCESSIBLE bit before open
clock in ehci_fsl_bus_resume, it cause accessing register without clock.
So we should change the code call order to avoid driver access register
without clock.
- Set HCD_FLAG_HW_ACCESSIBLE software flag after HW clock turn on
- remove some unnecessary code in ehci_fsl_pre_irq
Signed-off-by: make shi <b15407@freescale.com>
Diffstat (limited to 'drivers')
-rwxr-xr-x | drivers/usb/host/ehci-arc.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/usb/host/ehci-arc.c b/drivers/usb/host/ehci-arc.c index 35815869bb8d..cf9d9e1612f0 100755 --- a/drivers/usb/host/ehci-arc.c +++ b/drivers/usb/host/ehci-arc.c @@ -159,16 +159,6 @@ static irqreturn_t ehci_fsl_pre_irq(int irq, void *dev) pdata->wakeup_event = WAKEUP_EVENT_INVALID; fsl_usb_recover_hcd(pdev); return IRQ_HANDLED; - } else { - u32 portsc = 0; - struct ehci_hcd *ehci = hcd_to_ehci(hcd); - portsc = ehci_readl(ehci, &ehci->regs->port_status[0]); - /* PORT_USB11 macro is used to judge line state K*/ - if ((PORT_USB11(portsc)) && (portsc & PORT_SUSPEND)) { - pdata = hcd->self.controller->platform_data; - if (pdata->platform_resume) - pdata->platform_resume(pdata); - } } return IRQ_NONE; } @@ -485,10 +475,10 @@ static int ehci_fsl_bus_resume(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); usb_host_set_wakeup(hcd->self.controller, false); fsl_usb_lowpower_mode(pdata, false); + set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); } if (pdata->platform_resume) |