]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
clk: qcom: clk-alpha-pll: set ALPHA_EN bit for Stromer Plus PLLs
authorGabor Juhos <j4g8y7@gmail.com>
Wed, 8 May 2024 20:34:14 +0000 (22:34 +0200)
committerBjorn Andersson <andersson@kernel.org>
Tue, 28 May 2024 21:31:13 +0000 (16:31 -0500)
The clk_alpha_pll_stromer_plus_set_rate() function does not
sets the ALPHA_EN bit in the USER_CTL register, so setting
rates which requires using alpha mode works only if the bit
gets set already prior calling the function.

Extend the function to set the ALPHA_EN bit in order to allow
using fractional rates regardless whether the bit gets set
previously or not.

Fixes: 84da48921a97 ("clk: qcom: clk-alpha-pll: introduce stromer plus ops")
Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
Link: https://lore.kernel.org/r/20240508-stromer-plus-alpha-en-v1-1-6639ce01ca5b@gmail.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/clk/qcom/clk-alpha-pll.c

index d4227909d1fe13da5a86ede77a2f654bd35f4c41..c51647e37df8e64797ab3f2ee576eb96fb81724f 100644 (file)
@@ -2574,6 +2574,9 @@ static int clk_alpha_pll_stromer_plus_set_rate(struct clk_hw *hw,
        regmap_write(pll->clkr.regmap, PLL_ALPHA_VAL_U(pll),
                                        a >> ALPHA_BITWIDTH);
 
+       regmap_update_bits(pll->clkr.regmap, PLL_USER_CTL(pll),
+                          PLL_ALPHA_EN, PLL_ALPHA_EN);
+
        regmap_write(pll->clkr.regmap, PLL_MODE(pll), PLL_BYPASSNL);
 
        /* Wait five micro seconds or more */