summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/dwc3/dwc3-msm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/usb/dwc3/dwc3-msm.c b/drivers/usb/dwc3/dwc3-msm.c
index d92a33097461..26422a659bfc 100644
--- a/drivers/usb/dwc3/dwc3-msm.c
+++ b/drivers/usb/dwc3/dwc3-msm.c
@@ -224,6 +224,7 @@ struct dwc3_msm {
struct notifier_block id_nb;
struct notifier_block host_nb;
+ bool host_only_mode;
int pwr_event_irq;
atomic_t in_p3;
@@ -3224,6 +3225,7 @@ static int dwc3_msm_probe(struct platform_device *pdev)
if (host_mode ||
(dwc->is_drd && !of_property_read_bool(node, "extcon"))) {
dev_dbg(&pdev->dev, "DWC3 in default host mode\n");
+ mdwc->host_only_mode = true;
mdwc->id_state = DWC3_ID_GROUND;
dwc3_ext_event_notify(mdwc);
}
@@ -3598,7 +3600,9 @@ static int dwc3_otg_start_host(struct dwc3_msm *mdwc, int on)
mdwc->in_host_mode = false;
/* re-init core and OTG registers as block reset clears these */
- dwc3_post_host_reset_core_init(dwc);
+ if (!mdwc->host_only_mode)
+ dwc3_post_host_reset_core_init(dwc);
+
pm_runtime_mark_last_busy(mdwc->dev);
pm_runtime_put_sync_autosuspend(mdwc->dev);
dbg_event(0xFF, "StopHost psync",