Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 85a6795b authored by Mayank Rana's avatar Mayank Rana
Browse files

dwc3-msm: Don't block reset USB when stopping USB host mode



Currently driver is block resetting USB and re-initializing USB
into device mode when stopping host mode. This results into
resetting both USB high speed and super speed PHYs. USB QMP DP PHY's
reset performs global reset which also resets DP PHY. With this
4 lane DP functionality can't be supported when DP driver requests
2 lane to 4 lane DP functionality. dwc3_otg_start_peripheral() is
already performing USB DBM reset, and reinitializing USB controller
into device mode. Hence remove block reset functionality when
stopping USB host mode.

Change-Id: Idf457dad3a317451586c47d2cc413184d0c2fdde
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent 4d9a308b
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -3763,20 +3763,9 @@ static int dwc3_otg_start_host(struct dwc3_msm *mdwc, int on)
		platform_device_del(dwc->xhci);
		usb_unregister_notify(&mdwc->host_nb);

		/*
		 * Perform USB hardware RESET (both core reset and DBM reset)
		 * when moving from host to peripheral. This is required for
		 * peripheral mode to work.
		 */
		dwc3_msm_block_reset(mdwc, true);

		dwc3_usb3_phy_suspend(dwc, false);
		dwc3_set_mode(dwc, DWC3_GCTL_PRTCAP_DEVICE);

		mdwc->in_host_mode = false;

		/* re-init core and OTG registers as block reset clears these */
		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",