Skip to content

Commit a1f0019

Browse files
anderssonbebarino
authored andcommitted
clk: qcom: clk-alpha-pll: Don't reconfigure running Trion
In the event that the bootloader has configured the Trion PLL as source for the display clocks, e.g. for the continuous splashscreen, then there will also be RCGs that are clocked by this instance. Reconfiguring, and in particular disabling the output of, the PLL will cause issues for these downstream RCGs and has been shown to prevent them from being re-parented. Follow downstream and skip configuration if it's determined that the PLL is already running. Fixes: 59128c2 ("clk: qcom: clk-alpha-pll: Add support for controlling Lucid PLLs") Signed-off-by: Bjorn Andersson <[email protected]> Reviewed-by: Robert Foss <[email protected]> Reviewed-by: Vinod Koul <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent 9a61f81 commit a1f0019

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1429,6 +1429,15 @@ EXPORT_SYMBOL_GPL(clk_alpha_pll_postdiv_fabia_ops);
14291429
void clk_trion_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap,
14301430
const struct alpha_pll_config *config)
14311431
{
1432+
/*
1433+
* If the bootloader left the PLL enabled it's likely that there are
1434+
* RCGs that will lock up if we disable the PLL below.
1435+
*/
1436+
if (trion_pll_is_enabled(pll, regmap)) {
1437+
pr_debug("Trion PLL is already enabled, skipping configuration\n");
1438+
return;
1439+
}
1440+
14321441
clk_alpha_pll_write_config(regmap, PLL_L_VAL(pll), config->l);
14331442
regmap_write(regmap, PLL_CAL_L_VAL(pll), TRION_PLL_CAL_VAL);
14341443
clk_alpha_pll_write_config(regmap, PLL_ALPHA_VAL(pll), config->alpha);

0 commit comments

Comments
 (0)