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

Commit 3b24ae0f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "USB: dwc3-msm: Turn ON clocks before bringing PHYs out of suspend in resume"

parents 305b15c7 ff828138
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -2021,16 +2021,6 @@ static int dwc3_msm_resume(struct dwc3_msm *mdwc)
		clk_prepare_enable(mdwc->sleep_clk);
	}

	/* Resume SS PHY */
	if (mdwc->lpm_flags & MDWC3_SS_PHY_SUSPEND) {
		usb_phy_set_suspend(mdwc->ss_phy, 0);
		mdwc->ss_phy->flags &= ~DEVICE_IN_SS_MODE;
		mdwc->lpm_flags &= ~MDWC3_SS_PHY_SUSPEND;
	}

	/* Resume HS PHY */
	usb_phy_set_suspend(mdwc->hs_phy, 0);

	/*
	 * Enable clocks
	 * Turned ON iface_clk before core_clk due to FSM depedency.
@@ -2042,6 +2032,16 @@ static int dwc3_msm_resume(struct dwc3_msm *mdwc)
	if (mdwc->bus_aggr_clk)
		clk_prepare_enable(mdwc->bus_aggr_clk);

	/* Resume SS PHY */
	if (mdwc->lpm_flags & MDWC3_SS_PHY_SUSPEND) {
		usb_phy_set_suspend(mdwc->ss_phy, 0);
		mdwc->ss_phy->flags &= ~DEVICE_IN_SS_MODE;
		mdwc->lpm_flags &= ~MDWC3_SS_PHY_SUSPEND;
	}

	/* Resume HS PHY */
	usb_phy_set_suspend(mdwc->hs_phy, 0);

	/* Recover from controller power collapse */
	if (mdwc->lpm_flags & MDWC3_POWER_COLLAPSE) {
		dev_dbg(mdwc->dev, "%s: exit power collapse\n", __func__);