summaryrefslogtreecommitdiffstats
path: root/hw/arm/musicpal.c
diff options
context:
space:
mode:
authorPeter Maydell2022-05-16 12:30:58 +0200
committerPeter Maydell2022-05-19 17:19:03 +0200
commit9598c1bb39b2d4f0d3a55072cc70251c452132cd (patch)
tree25191a8ae0b092e021395c442830ae7e2599e72d /hw/arm/musicpal.c
parenthw/arm/virt: Drop #size-cells and #address-cells from gpio-keys dtb node (diff)
downloadqemu-9598c1bb39b2d4f0d3a55072cc70251c452132cd.tar.gz
qemu-9598c1bb39b2d4f0d3a55072cc70251c452132cd.tar.xz
qemu-9598c1bb39b2d4f0d3a55072cc70251c452132cd.zip
ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY
The traditional ptimer behaviour includes a collection of weird edge case behaviours. In 2016 we improved the ptimer implementation to fix these and generally make the behaviour more flexible, with ptimers opting in to the new behaviour by passing an appropriate set of policy flags to ptimer_init(). For backwards-compatibility, we defined PTIMER_POLICY_DEFAULT (which sets no flags) to give the old weird behaviour. This turns out to be a poor choice of name, because people writing new devices which use ptimers are misled into thinking that the default is probably a sensible choice of flags, when in fact it is almost always not what you want. Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY and beef up the comment to more clearly say that new devices should not be using it. The code-change part of this commit was produced by sed -i -e 's/PTIMER_POLICY_DEFAULT/PTIMER_POLICY_LEGACY/g' $(git grep -l PTIMER_POLICY_DEFAULT) with the exception of a test name string change in tests/unit/ptimer-test.c which was added manually. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Francisco Iglesias <francisco.iglesias@amd.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20220516103058.162280-1-peter.maydell@linaro.org
Diffstat (limited to 'hw/arm/musicpal.c')
-rw-r--r--hw/arm/musicpal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c
index 7c840fb428..b65c020115 100644
--- a/hw/arm/musicpal.c
+++ b/hw/arm/musicpal.c
@@ -464,7 +464,7 @@ static void mv88w8618_timer_init(SysBusDevice *dev, mv88w8618_timer_state *s,
sysbus_init_irq(dev, &s->irq);
s->freq = freq;
- s->ptimer = ptimer_init(mv88w8618_timer_tick, s, PTIMER_POLICY_DEFAULT);
+ s->ptimer = ptimer_init(mv88w8618_timer_tick, s, PTIMER_POLICY_LEGACY);
}
static uint64_t mv88w8618_pit_read(void *opaque, hwaddr offset,