aboutsummaryrefslogtreecommitdiff
path: root/hw/timer/puv3_ost.c
diff options
context:
space:
mode:
authorDmitry Osipenko <digetx@gmail.com>2016-09-22 18:13:06 +0100
committerPeter Maydell <peter.maydell@linaro.org>2016-09-22 18:13:06 +0100
commite7ea81c37d6f8b4202f63abbac35267bba1c8260 (patch)
tree0d2877f9fe156c7625c8534cd4de0869f9f873a4 /hw/timer/puv3_ost.c
parent780d23e54e4a62c1bc37641b72e0188b6d13e861 (diff)
downloadqemu-e7ea81c37d6f8b4202f63abbac35267bba1c8260.zip
qemu-e7ea81c37d6f8b4202f63abbac35267bba1c8260.tar.gz
qemu-e7ea81c37d6f8b4202f63abbac35267bba1c8260.tar.bz2
hw/ptimer: Introduce timer policy feature
Some of the timer devices may behave differently from what ptimer provides. Introduce ptimer policy feature that allows ptimer users to change default and wrong timer behaviour, for example to continuously trigger periodic timer when load value is equal to "0". Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Message-id: 994cd608ec392da6e58f0643800dda595edb9d97.1473252818.git.digetx@gmail.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/timer/puv3_ost.c')
-rw-r--r--hw/timer/puv3_ost.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/timer/puv3_ost.c b/hw/timer/puv3_ost.c
index 93650b7..0b3d717 100644
--- a/hw/timer/puv3_ost.c
+++ b/hw/timer/puv3_ost.c
@@ -125,7 +125,7 @@ static int puv3_ost_init(SysBusDevice *dev)
sysbus_init_irq(dev, &s->irq);
s->bh = qemu_bh_new(puv3_ost_tick, s);
- s->ptimer = ptimer_init(s->bh);
+ s->ptimer = ptimer_init(s->bh, PTIMER_POLICY_DEFAULT);
ptimer_set_freq(s->ptimer, 50 * 1000 * 1000);
memory_region_init_io(&s->iomem, OBJECT(s), &puv3_ost_ops, s, "puv3_ost",