Skip to content

Commit 4435467

Browse files
MrVanabelvesa
authored andcommitted
clk: imx: fracn-gppll: disable hardware select control
When programming PLL, should disable Hardware control select to make PLL controlled by register, not hardware inputs through OSCPLL. Fixes: 1b26cb8 ("clk: imx: support fracn gppll") Signed-off-by: Peng Fan <[email protected]> Reviewed-by: Abel Vesa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Abel Vesa <[email protected]>
1 parent cf8dccf commit 4435467

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/clk/imx/clk-fracn-gppll.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "clk.h"
1616

1717
#define PLL_CTRL 0x0
18+
#define HW_CTRL_SEL BIT(16)
1819
#define CLKMUX_BYPASS BIT(2)
1920
#define CLKMUX_EN BIT(1)
2021
#define POWERUP_MASK BIT(0)
@@ -193,6 +194,11 @@ static int clk_fracn_gppll_set_rate(struct clk_hw *hw, unsigned long drate,
193194

194195
rate = imx_get_pll_settings(pll, drate);
195196

197+
/* Hardware control select disable. PLL is control by register */
198+
tmp = readl_relaxed(pll->base + PLL_CTRL);
199+
tmp &= ~HW_CTRL_SEL;
200+
writel_relaxed(tmp, pll->base + PLL_CTRL);
201+
196202
/* Disable output */
197203
tmp = readl_relaxed(pll->base + PLL_CTRL);
198204
tmp &= ~CLKMUX_EN;

0 commit comments

Comments
 (0)