Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: qcom: apcs-msm8916: Flag a53mux instead of a53pll as critical

The clock source for MSM8916 cpu cores is like below.

|\
a53pll --------| \ a53mux +------+
| |------------| cpus |
gpll0_vote --------| / +------+
|/

So a53mux rather than a53pll is actually the parent clock of cpu cores.
It makes more sense to flag a53mux as critical instead, so that when
either a53pll or gpll0_vote is used by cpu cores, the clock will be kept
enabled while the other can be disabled.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Link: https://lore.kernel.org/r/20210704024032.11559-2-shawn.guo@linaro.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Shawn Guo and committed by
Stephen Boyd
0dfe9bf9 945cb3a1

+1 -2
-1
drivers/clk/qcom/a53-pll.c
··· 70 70 init.parent_names = (const char *[]){ "xo" }; 71 71 init.num_parents = 1; 72 72 init.ops = &clk_pll_sr2_ops; 73 - init.flags = CLK_IS_CRITICAL; 74 73 pll->clkr.hw.init = &init; 75 74 76 75 ret = devm_clk_register_regmap(dev, &pll->clkr);
+1 -1
drivers/clk/qcom/apcs-msm8916.c
··· 65 65 init.parent_data = pdata; 66 66 init.num_parents = ARRAY_SIZE(pdata); 67 67 init.ops = &clk_regmap_mux_div_ops; 68 - init.flags = CLK_SET_RATE_PARENT; 68 + init.flags = CLK_IS_CRITICAL | CLK_SET_RATE_PARENT; 69 69 70 70 a53cc->clkr.hw.init = &init; 71 71 a53cc->clkr.regmap = regmap;