diff options
author | Thinh Nguyen <thinh.nguyen@synopsys.com> | 2018-11-02 18:41:42 -0700 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2018-11-26 09:06:32 +0200 |
commit | 89a9cc47513e91bc91ba2c438d5e422a0c8d05e7 (patch) | |
tree | 2f85749f36d6d8399e21e6d05ab9318d48efc900 /drivers/usb/dwc3/core.c | |
parent | ceb94bc52c437463f0903e61060a94a2226fb672 (diff) | |
download | blackbird-op-linux-89a9cc47513e91bc91ba2c438d5e422a0c8d05e7.tar.gz blackbird-op-linux-89a9cc47513e91bc91ba2c438d5e422a0c8d05e7.zip |
usb: dwc3: Set default mode for DWC_usb3 v3.30a and higher
DWC_usb31 and DWC_usb3 v3.30a and higher do not support OTG mode. If
the controller supports DRD but the dr_mode is not specified or set to
OTG, then set the mode to peripheral.
Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3/core.c')
-rw-r--r-- | drivers/usb/dwc3/core.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 6acadd647dc3..8f6d9c6f016e 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -80,11 +80,12 @@ static int dwc3_get_dr_mode(struct dwc3 *dwc) mode = USB_DR_MODE_PERIPHERAL; /* - * dwc_usb31 does not support OTG mode. If the controller - * supports DRD but the dr_mode is not specified or set to OTG, - * then set the mode to peripheral. + * DWC_usb31 and DWC_usb3 v3.30a and higher do not support OTG + * mode. If the controller supports DRD but the dr_mode is not + * specified or set to OTG, then set the mode to peripheral. */ - if (mode == USB_DR_MODE_OTG && dwc3_is_usb31(dwc)) + if (mode == USB_DR_MODE_OTG && + dwc->revision >= DWC3_REVISION_330A) mode = USB_DR_MODE_PERIPHERAL; } |