]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
clk: samsung: update PLL locktime for PLL142XX used on FSD platform
authorVarada Pavani <v.pavani@samsung.com>
Tue, 25 Feb 2025 13:19:18 +0000 (18:49 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 Mar 2025 19:54:24 +0000 (12:54 -0700)
commit 53517a70873c7a91675f7244768aad5006cc45de upstream.

Currently PLL142XX locktime is 270. As per spec, it should be 150. Hence
update PLL142XX controller locktime to 150.

Cc: stable@vger.kernel.org
Fixes: 4f346005aaed ("clk: samsung: fsd: Add initial clock support")
Signed-off-by: Varada Pavani <v.pavani@samsung.com>
Link: https://lore.kernel.org/r/20250225131918.50925-3-v.pavani@samsung.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/clk/samsung/clk-pll.c

index cca3e630922c1487c76aa92999d6c1896c156b06..68a72f5fd9a5a6e6201a32875d4e99304a228a86 100644 (file)
@@ -206,6 +206,7 @@ static const struct clk_ops samsung_pll3000_clk_ops = {
  */
 /* Maximum lock time can be 270 * PDIV cycles */
 #define PLL35XX_LOCK_FACTOR    (270)
+#define PLL142XX_LOCK_FACTOR   (150)
 
 #define PLL35XX_MDIV_MASK       (0x3FF)
 #define PLL35XX_PDIV_MASK       (0x3F)
@@ -272,7 +273,11 @@ static int samsung_pll35xx_set_rate(struct clk_hw *hw, unsigned long drate,
        }
 
        /* Set PLL lock time. */
-       writel_relaxed(rate->pdiv * PLL35XX_LOCK_FACTOR,
+       if (pll->type == pll_142xx)
+               writel_relaxed(rate->pdiv * PLL142XX_LOCK_FACTOR,
+                       pll->lock_reg);
+       else
+               writel_relaxed(rate->pdiv * PLL35XX_LOCK_FACTOR,
                        pll->lock_reg);
 
        /* Change PLL PMS values */