[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 07/13] hw/misc/stm32l4x5_rcc: Propagate period when enabling a clo
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 07/13] hw/misc/stm32l4x5_rcc: Propagate period when enabling a clock |
Date: |
Tue, 26 Mar 2024 16:44:58 +0100 |
From: Arnaud Minier <arnaud.minier@telecom-paris.fr>
The "clock_set_mul_div" function doesn't propagate the clock period
to the children if it is changed (e.g. by enabling/disabling a clock
multiplexer).
This was overlooked during the implementation due to late changes.
This commit propagates the change if the multiplier or divider changes.
Fixes: ec7d83acbd ("hw/misc/stm32l4x5_rcc: Add an internal clock multiplexer
object")
Signed-off-by: Arnaud Minier <arnaud.minier@telecom-paris.fr>
Signed-off-by: Inès Varhol <ines.varhol@telecom-paris.fr>
Message-ID: <20240317103918.44375-2-arnaud.minier@telecom-paris.fr>
[PMD: Check clock_set_mul_div() return value]
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20240325152827.73817-4-philmd@linaro.org>
---
hw/misc/stm32l4x5_rcc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/misc/stm32l4x5_rcc.c b/hw/misc/stm32l4x5_rcc.c
index 49b90afdf0..ed2dbd9dc3 100644
--- a/hw/misc/stm32l4x5_rcc.c
+++ b/hw/misc/stm32l4x5_rcc.c
@@ -61,7 +61,7 @@ static void clock_mux_update(RccClockMuxState *mux, bool
bypass_source)
freq_multiplier = mux->divider;
}
- clock_set_mul_div(mux->out, freq_multiplier, mux->multiplier);
+ clk_changed |= clock_set_mul_div(mux->out, freq_multiplier,
mux->multiplier);
clk_changed |= clock_set(mux->out, clock_get(current_source));
if (clk_changed) {
clock_propagate(mux->out);
--
2.41.0
- [PULL 00/13] Misc HW patches for 2024-03-26, Philippe Mathieu-Daudé, 2024/03/26
- [PULL 02/13] hw/scsi/scsi-generic: Fix io_timeout property not applying, Philippe Mathieu-Daudé, 2024/03/26
- [PULL 01/13] target/i386/tcg: Enable page walking from MMIO memory, Philippe Mathieu-Daudé, 2024/03/26
- [PULL 03/13] monitor/hmp-cmds-target: Append a space in error message in gpa2hva(), Philippe Mathieu-Daudé, 2024/03/26
- [PULL 04/13] target/tricore/helper: Use correct string format in cpu_tlb_fill(), Philippe Mathieu-Daudé, 2024/03/26
- [PULL 05/13] hw/clock: Let clock_set_mul_div() return a boolean value, Philippe Mathieu-Daudé, 2024/03/26
- [PULL 06/13] hw/misc/stm32l4x5_rcc: Inline clock_update() in clock_mux_update(), Philippe Mathieu-Daudé, 2024/03/26
- [PULL 07/13] hw/misc/stm32l4x5_rcc: Propagate period when enabling a clock,
Philippe Mathieu-Daudé <=
- [PULL 09/13] contrib/plugins/execlog: Fix compiler warning, Philippe Mathieu-Daudé, 2024/03/26
- [PULL 08/13] docs/system/ppc/amigang.rst: Fix formatting, Philippe Mathieu-Daudé, 2024/03/26
- [PULL 10/13] hw/smbios: add stub for smbios_get_table_legacy(), Philippe Mathieu-Daudé, 2024/03/26
- [PULL 11/13] ui/cocoa: Fix aspect ratio, Philippe Mathieu-Daudé, 2024/03/26
- [PULL 12/13] ui/cocoa: Resize window after toggling zoom-to-fit, Philippe Mathieu-Daudé, 2024/03/26
- [PULL 13/13] ui/cocoa: Use NSTrackingInVisibleRect, Philippe Mathieu-Daudé, 2024/03/26
- Re: [PULL 00/13] Misc HW patches for 2024-03-26, Peter Maydell, 2024/03/26