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

Commit f9f33ec1 authored by Vikram Mulukutla's avatar Vikram Mulukutla
Browse files

msm: clock-gcc-8974: Zero out CDIV bits in the top level debug mux



The top level debug mux register is accessible to subsystems
other than apps. Zero out the CDIV bits to ensure measurement
is correct.

Change-Id: I93aca5d881b0eb02e44ac725fc1941be946d8246
Signed-off-by: default avatarVikram Mulukutla <markivx@codeaurora.org>
parent 1d77d770
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -2241,6 +2241,13 @@ struct measure_clk_data debug_mux_priv = {

static int gcc_set_mux_sel(struct mux_clk *clk, int sel)
{
	u32 regval;

	/* Zero out CDIV bits in top level debug mux register */
	regval = readl_relaxed(GCC_REG_BASE(GCC_DEBUG_CLK_CTL_REG));
	regval &= ~BM(15, 12);
	writel_relaxed(regval, GCC_REG_BASE(GCC_DEBUG_CLK_CTL_REG));

	/*
	 * RPM clocks use the same GCC debug mux. Don't reprogram
	 * the mux (selection) register.