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

Commit ef9cacf0 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: pcie: switch pipe clk mux source to XO before disabling GDSC"

parents 27986e14 e0e2e647
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -3146,11 +3146,11 @@ static int msm_pcie_clk_init(struct msm_pcie_dev_t *dev)
				clk_disable_unprepare(hdl);
		}

		regulator_disable(dev->gdsc);

		/* switch pipe clock mux after gdsc is turned off */
		/* switch pipe clock mux to xo before turning off gdsc */
		if (dev->pipe_clk_mux && dev->ref_clk_src)
			clk_set_parent(dev->pipe_clk_mux, dev->ref_clk_src);

		regulator_disable(dev->gdsc);
	}

	for (i = 0; i < MSM_PCIE_MAX_RESET; i++) {
@@ -3212,12 +3212,12 @@ static void msm_pcie_clk_deinit(struct msm_pcie_dev_t *dev)
				dev->rc_idx);
	}

	regulator_disable(dev->gdsc);

	/* switch pipe clock mux after gdsc is turned off */
	/* switch pipe clock mux to xo before turning off gdsc */
	if (dev->pipe_clk_mux && dev->ref_clk_src)
		clk_set_parent(dev->pipe_clk_mux, dev->ref_clk_src);

	regulator_disable(dev->gdsc);

	PCIE_DBG(dev, "RC%d: exit\n", dev->rc_idx);
}