diff options
author | Gabriel Fernandez <[email protected]> | 2022-05-16 09:05:56 +0200 |
---|---|---|
committer | Stephen Boyd <[email protected]> | 2022-05-20 21:07:49 -0700 |
commit | ffa2d04d859e99d69d0c89d3dc50067022544354 (patch) | |
tree | f2a746bd38a4d4375154c6bbbca8f7d77bb53be9 /drivers/clk/stm32/clk-stm32-core.c | |
parent | bfad377983565358c8259e48693331b327535335 (diff) |
clk: stm32mp13: add multi mux function
Some RCC muxes can manages two output clocks with same register.
Signed-off-by: Gabriel Fernandez <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Stephen Boyd <[email protected]>
Diffstat (limited to 'drivers/clk/stm32/clk-stm32-core.c')
-rw-r--r-- | drivers/clk/stm32/clk-stm32-core.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/clk/stm32/clk-stm32-core.c b/drivers/clk/stm32/clk-stm32-core.c index 70014c15d15f..e5a22bb09495 100644 --- a/drivers/clk/stm32/clk-stm32-core.c +++ b/drivers/clk/stm32/clk-stm32-core.c @@ -472,6 +472,16 @@ static int clk_stm32_composite_set_parent(struct clk_hw *hw, u8 index) spin_unlock_irqrestore(composite->lock, flags); + if (composite->clock_data->is_multi_mux) { + struct clk_hw *other_mux_hw = composite->clock_data->is_multi_mux(hw); + + if (other_mux_hw) { + struct clk_hw *hwp = clk_hw_get_parent_by_index(hw, index); + + clk_hw_reparent(other_mux_hw, hwp); + } + } + return 0; } |