mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-28 21:03:54 -06:00
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>
This commit is contained in:
parent
780d23e54e
commit
e7ea81c37d
24 changed files with 57 additions and 31 deletions
|
@ -184,7 +184,7 @@ static void lm32_timer_init(Object *obj)
|
|||
sysbus_init_irq(dev, &s->irq);
|
||||
|
||||
s->bh = qemu_bh_new(timer_hit, s);
|
||||
s->ptimer = ptimer_init(s->bh);
|
||||
s->ptimer = ptimer_init(s->bh, PTIMER_POLICY_DEFAULT);
|
||||
|
||||
memory_region_init_io(&s->iomem, obj, &timer_ops, s,
|
||||
"timer", R_MAX * 4);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue