aboutsummaryrefslogtreecommitdiff
path: root/hw/core
diff options
context:
space:
mode:
authorRaphael Poggi <raphael.poggi@lynxleap.co.uk>2024-04-19 17:29:51 +0100
committerPeter Maydell <peter.maydell@linaro.org>2024-04-30 15:01:05 +0100
commit845dd0385eb738690ee19e60111952a363bbf257 (patch)
treeb02eb50fa4b1c4afb7363f639ddb013c22c4a200 /hw/core
parent5fee33d97a7f2e95716417bd164f2f5264acd976 (diff)
downloadqemu-845dd0385eb738690ee19e60111952a363bbf257.zip
qemu-845dd0385eb738690ee19e60111952a363bbf257.tar.gz
qemu-845dd0385eb738690ee19e60111952a363bbf257.tar.bz2
hw/core/clock: allow clock_propagate on child clocks
clock_propagate() has an assert that clk->source is NULL, i.e. that you are calling it on a clock which has no source clock. This made sense in the original design where the only way for a clock's frequency to change if it had a source clock was when that source clock changed. However, we subsequently added multiplier/divider support, but didn't look at what that meant for propagation. If a clock-management device changes the multiplier or divider value on a clock, it needs to propagate that change down to child clocks, even if the clock has a source clock set. So the assertion is now incorrect. Remove the assertion. Signed-off-by: Raphael Poggi <raphael.poggi@lynxleap.co.uk> Message-id: 20240419162951.23558-1-raphael.poggi@lynxleap.co.uk Reviewed-by: Peter Maydell <peter.maydell@linaro.org> [PMM: Rewrote the commit message] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/core')
-rw-r--r--hw/core/clock.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/hw/core/clock.c b/hw/core/clock.c
index a19c7db..e212865 100644
--- a/hw/core/clock.c
+++ b/hw/core/clock.c
@@ -108,7 +108,6 @@ static void clock_propagate_period(Clock *clk, bool call_callbacks)
void clock_propagate(Clock *clk)
{
- assert(clk->source == NULL);
trace_clock_propagate(CLOCK_PATH(clk));
clock_propagate_period(clk, true);
}