[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <muiuqvl44fnbbhwatwczek6nvcyl6rtak37owjfazmhefibfof@4sedw3mzcc33>
Date: Sat, 20 Apr 2024 11:48:44 -0500
From: Bjorn Andersson <andersson@...nel.org>
To: Abel Vesa <abel.vesa@...aro.org>
Cc: Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>, Konrad Dybcio <konrad.dybcio@...aro.org>,
Dmitry Baryshkov <dmitry.baryshkov@...aro.org>, linux-arm-msm@...r.kernel.org, linux-clk@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] clk: qcom: clk-alpha-pll: Skip reconfiguring the running
Lucid Evo
On Thu, Apr 18, 2024 at 04:41:32PM +0300, Abel Vesa wrote:
> The PLL0 is configured by the bootlader 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.
>
:set spell
> Signed-off-by: Abel Vesa <abel.vesa@...aro.org>
Reviewed-by: Bjorn Andersson <andersson@...nel.org>
Regards,
Bjorn
> ---
> drivers/clk/qcom/clk-alpha-pll.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk-alpha-pll.c
> index 8a412ef47e16..4c5aeccff0ef 100644
> --- a/drivers/clk/qcom/clk-alpha-pll.c
> +++ b/drivers/clk/qcom/clk-alpha-pll.c
> @@ -2114,6 +2114,15 @@ void clk_lucid_evo_pll_configure(struct clk_alpha_pll *pll, struct regmap *regma
> {
> u32 lval = config->l;
>
> + /*
> + * If the bootloader left the PLL enabled it's likely that there are
> + * RCGs that will lock up if we disable the PLL below.
> + */
> + if (trion_pll_is_enabled(pll, regmap)) {
> + pr_debug("Lucid Evo PLL is already enabled, skipping configuration\n");
> + return;
> + }
> +
> lval |= TRION_PLL_CAL_VAL << LUCID_EVO_PLL_CAL_L_VAL_SHIFT;
> clk_alpha_pll_write_config(regmap, PLL_L_VAL(pll), lval);
> clk_alpha_pll_write_config(regmap, PLL_ALPHA_VAL(pll), config->alpha);
>
> ---
> base-commit: 4eab358930711bbeb85bf5ee267d0d42d3394c2c
> change-id: 20240418-clk-qcom-lucid-evo-skip-configuring-enabled-711b7e7835b0
>
> Best regards,
> --
> Abel Vesa <abel.vesa@...aro.org>
>
Powered by blists - more mailing lists