summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorMayank Rana <mrana@codeaurora.org>2015-02-10 16:51:10 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 11:06:43 -0700
commitfcc26a6a54615c0d0b3001fa1a8fc265abde7614 (patch)
treeabb3910bf53d65d3f5e1a8d2492aef3d59d79a38 /drivers/usb
parent0071b357da5fbad68189ca7a47cde5a6bdb75e33 (diff)
usb: dwc3: Fall back to high speed when SSPHY fails
In some cases, it has been observed that SSPHY fails to initialized. This change detects this condition and configures controller to work into high speed mode only. Change-Id: I50c4041d8572d0cdc4535812eebd10fc18b78e98 Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/dwc3/core.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 6ae3202ae9e6..5fa3423d30a2 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -107,8 +107,15 @@ static int dwc3_init_usb_phys(struct dwc3 *dwc)
__func__, ret);
return ret;
}
+
ret = usb_phy_init(dwc->usb3_phy);
- if (ret) {
+ if (ret == -EBUSY) {
+ /*
+ * Setting Max speed as high when USB3 PHY initialiation
+ * is failing and USB superspeed can't be supported.
+ */
+ dwc->maximum_speed = USB_SPEED_HIGH;
+ } else if (ret) {
pr_err("%s: usb_phy_init(dwc->usb3_phy) returned %d\n",
__func__, ret);
return ret;