EHCI: HSIC: Do not suspend contoller if port is not enabled
Do not suspend the hsic controller by setting PHCD bit and
turning off clocks if port is not enabled as hsic controller
cannot detect connect event from peripheral if it is in low
power mode.
Change-Id: I2cf36f4c260f0fc94363869ed42a57b3d4839f3c
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
diff --git a/drivers/usb/host/ehci-msm-hsic.c b/drivers/usb/host/ehci-msm-hsic.c
index 4948d03..fd3d1ca 100644
--- a/drivers/usb/host/ehci-msm-hsic.c
+++ b/drivers/usb/host/ehci-msm-hsic.c
@@ -356,6 +356,12 @@
return 0;
}
+ if (!(readl_relaxed(USB_PORTSC) & PORT_PE)) {
+ dev_dbg(mehci->dev, "%s:port is not enabled skip suspend\n",
+ __func__);
+ return -EAGAIN;
+ }
+
disable_irq(hcd->irq);
/* make sure we don't race against a remote wakeup */