Skip to content

Commit 810e6d2

Browse files
abelvesaandersson
authored andcommitted
clk: qcom: clk-alpha-pll: Skip reconfiguring the running Lucid Evo
The PLL0 is configured by the bootloader and is the parent of the mdp_clk_src. The Trion implementation of the configure function is already skipping this step if the PLL is enabled, so lets extend the same behavior to Lucid Evo variant. Signed-off-by: Abel Vesa <abel.vesa@linaro.org> Reviewed-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20240418-clk-qcom-lucid-evo-skip-configuring-enabled-v1-1-caede5f1c7a3@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org>
1 parent 1aab318 commit 810e6d2

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

drivers/clk/qcom/clk-alpha-pll.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2114,6 +2114,15 @@ void clk_lucid_evo_pll_configure(struct clk_alpha_pll *pll, struct regmap *regma
21142114
{
21152115
u32 lval = config->l;
21162116

2117+
/*
2118+
* If the bootloader left the PLL enabled it's likely that there are
2119+
* RCGs that will lock up if we disable the PLL below.
2120+
*/
2121+
if (trion_pll_is_enabled(pll, regmap)) {
2122+
pr_debug("Lucid Evo PLL is already enabled, skipping configuration\n");
2123+
return;
2124+
}
2125+
21172126
lval |= TRION_PLL_CAL_VAL << LUCID_EVO_PLL_CAL_L_VAL_SHIFT;
21182127
clk_alpha_pll_write_config(regmap, PLL_L_VAL(pll), lval);
21192128
clk_alpha_pll_write_config(regmap, PLL_ALPHA_VAL(pll), config->alpha);

0 commit comments

Comments
 (0)