summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSean Anderson <[email protected]>2021-04-08 22:13:04 -0400
committerLeo Yu-Chi Liang <[email protected]>2021-05-14 16:20:47 +0800
commitd0686a02b98ee264532c25108edc3ba44acc1145 (patch)
treeadcffc10cdb141a5aabfc93836602df271c71f7c /drivers
parent8c12cb3fd80304d4d542d35405aa54ae4a317e9b (diff)
clk: k210: Fix PLLs not being enabled
After starting or setting the rate of a PLL, the enable bit must be set. This fixes a bug where the AI ram would not be accessible, because it requires PLL1 to be running. Signed-off-by: Sean Anderson <[email protected]> Reviewed-by: Damien Le Moal <[email protected]>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/clk/kendryte/pll.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/clk/kendryte/pll.c b/drivers/clk/kendryte/pll.c
index ab6d75d585a..f1989201131 100644
--- a/drivers/clk/kendryte/pll.c
+++ b/drivers/clk/kendryte/pll.c
@@ -531,6 +531,7 @@ static int k210_pll_enable(struct clk *clk)
k210_pll_waitfor_lock(pll);
reg &= ~K210_PLL_BYPASS;
+ reg |= K210_PLL_EN;
writel(reg, pll->reg);
return 0;
@@ -550,6 +551,7 @@ static int k210_pll_disable(struct clk *clk)
writel(reg, pll->reg);
reg &= ~K210_PLL_PWRD;
+ reg &= ~K210_PLL_EN;
writel(reg, pll->reg);
return 0;
}