Skip to content

Commit faa0e30

Browse files
damien-lemoalbebarino
authored andcommitted
clk: k210: Fix k210_clk_set_parent()
In k210_clk_set_parent(), add missing writel() call to update the mux register of a clock to change its parent. This also fixes a compilation warning with clang when compiling with W=1. Fixes: c6ca761 ("clk: Add RISC-V Canaan Kendryte K210 clock driver") Cc: [email protected] Signed-off-by: Damien Le Moal <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent 2cdee50 commit faa0e30

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/clk/clk-k210.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,7 @@ static int k210_clk_set_parent(struct clk_hw *hw, u8 index)
722722
reg |= BIT(cfg->mux_bit);
723723
else
724724
reg &= ~BIT(cfg->mux_bit);
725+
writel(reg, ksc->regs + cfg->mux_reg);
725726
spin_unlock_irqrestore(&ksc->clk_lock, flags);
726727

727728
return 0;

0 commit comments

Comments
 (0)