summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony LIU <junjie.liu@freescale.com>2011-12-30 14:32:41 +0800
committerTony LIU <junjie.liu@freescale.com>2011-12-31 09:40:37 +0800
commit574b9641d5846e58273dac6bf80fcf1ff312c5c9 (patch)
treed720ca668ff8637800d9c0e43dfaa9029bc64c53
parentc247025a9f9d80d5ba3e02b8b617b6c155bbcbef (diff)
ENGR00171027-2 [USB_HOST]after plug in/out on the hub,host can't work
This issue will happen only when suspend bit is set but phcd is not set The root cause of this issue is the IC defect. - If the suspend bit is set without phcd bit set, host controller can't resume normally - The workaround is after set suspend bit, we need set the following bit in USB PHY at once: HW_USBPHY_PWD_RXPWDRX HW_USBPHY_PWD_RXPWDDIFF HW_USBPHY_PWD_RXPWD1PT1 HW_USBPHY_PWD_RXPWDENV HW_USBPHY_PWD_TXPWDv2I HW_USBPHY_PWD_TXPWDIBIAS HW_USBPHY_PWD_TXPWDFS - Furthermore, after resume, we must clear these bits during the K state - IC has no plan to fix this issue - This issue only happen on MX6Q/MX28 driver part Signed-off-by: Tony LIU <junjie.liu@freescale.com>
-rw-r--r--drivers/usb/host/ehci-arc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-arc.c b/drivers/usb/host/ehci-arc.c
index 4e6674a684df..1d015c92fc9c 100644
--- a/drivers/usb/host/ehci-arc.c
+++ b/drivers/usb/host/ehci-arc.c
@@ -155,6 +155,16 @@ static irqreturn_t ehci_fsl_pre_irq(int irq, void *dev)
pdata->wakeup_event = 0;
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;
}