From e7ea81c37d6f8b4202f63abbac35267bba1c8260 Mon Sep 17 00:00:00 2001 From: Dmitry Osipenko Date: Thu, 22 Sep 2016 18:13:06 +0100 Subject: 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 Message-id: 994cd608ec392da6e58f0643800dda595edb9d97.1473252818.git.digetx@gmail.com Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/timer/imx_epit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw/timer/imx_epit.c') diff --git a/hw/timer/imx_epit.c b/hw/timer/imx_epit.c index eddf3481e8..f34d7f7c77 100644 --- a/hw/timer/imx_epit.c +++ b/hw/timer/imx_epit.c @@ -314,10 +314,10 @@ static void imx_epit_realize(DeviceState *dev, Error **errp) 0x00001000); sysbus_init_mmio(sbd, &s->iomem); - s->timer_reload = ptimer_init(NULL); + s->timer_reload = ptimer_init(NULL, PTIMER_POLICY_DEFAULT); bh = qemu_bh_new(imx_epit_cmp, s); - s->timer_cmp = ptimer_init(bh); + s->timer_cmp = ptimer_init(bh, PTIMER_POLICY_DEFAULT); } static void imx_epit_class_init(ObjectClass *klass, void *data) -- cgit v1.2.3