mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 15:41:40 +00:00
clk: k210: Fix PLL enable always getting taken
This conditional always evaluated as false, regardless of the value of reg. Fix it so that it properly tests the bits in the PLL register. Also test PLL_EN, now that we set it. Reported-by: Damien Le Moal <Damien.LeMoal@wdc.com> Signed-off-by: Sean Anderson <seanga2@gmail.com>
This commit is contained in:
parent
d0686a02b9
commit
598a06dcb4
1 changed files with 2 additions and 1 deletions
|
@ -512,7 +512,8 @@ static int k210_pll_enable(struct clk *clk)
|
|||
struct k210_pll *pll = to_k210_pll(clk);
|
||||
u32 reg = readl(pll->reg);
|
||||
|
||||
if ((reg | K210_PLL_PWRD) && !(reg | K210_PLL_RESET))
|
||||
if ((reg & K210_PLL_PWRD) && (reg & K210_PLL_EN) &&
|
||||
!(reg & K210_PLL_RESET))
|
||||
return 0;
|
||||
|
||||
reg |= K210_PLL_PWRD;
|
||||
|
|
Loading…
Reference in a new issue