summaryrefslogtreecommitdiffstats
path: root/hw/net/lan9118.c
diff options
context:
space:
mode:
authorDmitry Osipenko2016-09-22 19:13:06 +0200
committerPeter Maydell2016-09-22 19:13:06 +0200
commite7ea81c37d6f8b4202f63abbac35267bba1c8260 (patch)
tree0d2877f9fe156c7625c8534cd4de0869f9f873a4 /hw/net/lan9118.c
parenthw/ptimer: Actually stop the timer in case of error (diff)
downloadqemu-e7ea81c37d6f8b4202f63abbac35267bba1c8260.tar.gz
qemu-e7ea81c37d6f8b4202f63abbac35267bba1c8260.tar.xz
qemu-e7ea81c37d6f8b4202f63abbac35267bba1c8260.zip
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/net/lan9118.c')
-rw-r--r--hw/net/lan9118.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/net/lan9118.c b/hw/net/lan9118.c
index 4615d873b1..3db8937cac 100644
--- a/hw/net/lan9118.c
+++ b/hw/net/lan9118.c
@@ -1345,7 +1345,7 @@ static int lan9118_init1(SysBusDevice *sbd)
s->txp = &s->tx_packet;
bh = qemu_bh_new(lan9118_tick, s);
- s->timer = ptimer_init(bh);
+ s->timer = ptimer_init(bh, PTIMER_POLICY_DEFAULT);
ptimer_set_freq(s->timer, 10000);
ptimer_set_limit(s->timer, 0xffff, 1);