diff options
author | Damien Le Moal <damien.lemoal@wdc.com> | 2021-06-22 09:45:02 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-07-14 17:59:09 +0300 |
commit | 74672ecf9f2a14eed4701a7375cbf76b8ea9e87a (patch) | |
tree | 61074eff2397e975c307d5758aa1fe3f7f9f53ae | |
parent | 862f02bc7cf5d3f573e0e93c7e48d146073b84d1 (diff) | |
download | linux-74672ecf9f2a14eed4701a7375cbf76b8ea9e87a.tar.xz |
clk: k210: Fix k210_clk_set_parent()
commit faa0e307948594b4379a86fff7fb2409067aed6f upstream.
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: c6ca7616f7d5 ("clk: Add RISC-V Canaan Kendryte K210 clock driver")
Cc: stable@vger.kernel.org
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Link: https://lore.kernel.org/r/20210622064502.14841-1-damien.lemoal@wdc.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/clk/clk-k210.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/clk/clk-k210.c b/drivers/clk/clk-k210.c index 6c84abf5b2e3..67a7cb3503c3 100644 --- a/drivers/clk/clk-k210.c +++ b/drivers/clk/clk-k210.c @@ -722,6 +722,7 @@ static int k210_clk_set_parent(struct clk_hw *hw, u8 index) reg |= BIT(cfg->mux_bit); else reg &= ~BIT(cfg->mux_bit); + writel(reg, ksc->regs + cfg->mux_reg); spin_unlock_irqrestore(&ksc->clk_lock, flags); return 0; |