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

Commit 1846787e authored by Vikram Mulukutla's avatar Vikram Mulukutla
Browse files

clk: msm: clock-pll: Always set the rate in variable-rate pll handoff



Even if a variable-rate PLL is disabled, record its rate in the
clk->rate field, so that handoff of the clock tree can take
place.

Change-Id: I91af11d7f0dddc1d0ec59c84de22357c9a5576e6
Signed-off-by: default avatarVikram Mulukutla <markivx@codeaurora.org>
parent d9642cc2
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -623,10 +623,9 @@ static enum handoff variable_rate_pll_handoff(struct clk *c)

	pll->src_rate = clk_get_rate(c->parent);

	if ((mode & mask) != mask)
		return HANDOFF_DISABLED_CLK;

	lval = readl_relaxed(PLL_L_REG(pll));
	if (!lval)
		return HANDOFF_DISABLED_CLK;

	c->rate = pll->src_rate * lval;

@@ -635,6 +634,9 @@ static enum handoff variable_rate_pll_handoff(struct clk *c)
		return HANDOFF_DISABLED_CLK;
	}

	if ((mode & mask) != mask)
		return HANDOFF_DISABLED_CLK;

	return HANDOFF_ENABLED_CLK;
}