summaryrefslogtreecommitdiff
path: root/drivers/usb/phy
diff options
context:
space:
mode:
authorAjay Agarwal <ajaya@codeaurora.org>2019-08-30 14:11:00 +0530
committerAjay Agarwal <ajaya@codeaurora.org>2019-09-12 17:49:42 +0530
commitd418b9a1df7e92e22646f72fd2f3b7515b4316ea (patch)
tree75500b15f857d41f3f209107ab08059a85a4af48 /drivers/usb/phy
parentb2c10286f7e3250fbb1473c28d1a7fd40e091d37 (diff)
usb: dwc3-msm: Try core reset and reinit if PHY PLL lock fails
Add support for retrying core reset and re-initialization in host mode if the PHY PLL lock failure is seen. Also, increase the lock timeout to 50 msec. Change-Id: I8c8db60dcd73b7cf05598538d0c519b1b1e2417f Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
Diffstat (limited to 'drivers/usb/phy')
-rw-r--r--drivers/usb/phy/phy-msm-qusb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/phy/phy-msm-qusb.c b/drivers/usb/phy/phy-msm-qusb.c
index ae72ec6b3d19..1b09c028d098 100644
--- a/drivers/usb/phy/phy-msm-qusb.c
+++ b/drivers/usb/phy/phy-msm-qusb.c
@@ -862,7 +862,7 @@ static int qusb_phy_init(struct usb_phy *phy)
wmb();
/* Required to get PHY PLL lock successfully */
- usleep_range(100, 110);
+ usleep_range(50000, 51000);
}
if (qphy->major_rev < 2) {
@@ -881,6 +881,7 @@ static int qusb_phy_init(struct usb_phy *phy)
if (pll_lock_fail) {
dev_err(phy->dev, "QUSB PHY PLL LOCK fails:%x\n", reg);
WARN_ON(1);
+ return -ETIMEDOUT;
}
return 0;