]> git.hungrycats.org Git - linux/commit
clk: qcom: clk-alpha-pll: Fix CAL_L_VAL override for LUCID EVO PLL
authorAjit Pandey <quic_ajipan@quicinc.com>
Tue, 11 Jun 2024 13:37:45 +0000 (19:07 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Oct 2024 10:01:02 +0000 (12:01 +0200)
commit3dd3b564535c5e3498bb9d2238717fc55f85db69
tree267b1722a08ecad2ba0dd5aa2db516c52f4505f8
parent0e2e46d4e5cbe7f4c3cf579d25ffd9c5f93439df
clk: qcom: clk-alpha-pll: Fix CAL_L_VAL override for LUCID EVO PLL

commit fff617979f97c773aaa9432c31cf62444b3bdbd4 upstream.

In LUCID EVO PLL CAL_L_VAL and L_VAL bitfields are part of single
PLL_L_VAL register. Update for L_VAL bitfield values in PLL_L_VAL
register using regmap_write() API in __alpha_pll_trion_set_rate
callback will override LUCID EVO PLL initial configuration related
to PLL_CAL_L_VAL bit fields in PLL_L_VAL register.

Observed random PLL lock failures during PLL enable due to such
override in PLL calibration value. Use regmap_update_bits() with
L_VAL bitfield mask instead of regmap_write() API to update only
PLL_L_VAL bitfields in __alpha_pll_trion_set_rate callback.

Fixes: 260e36606a03 ("clk: qcom: clk-alpha-pll: add Lucid EVO PLL configuration interfaces")
Cc: stable@vger.kernel.org
Signed-off-by: Ajit Pandey <quic_ajipan@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Acked-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Link: https://lore.kernel.org/r/20240611133752.2192401-2-quic_ajipan@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/clk/qcom/clk-alpha-pll.c