aboutsummaryrefslogtreecommitdiff
path: root/hw/arm_mptimer.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2012-04-20 15:38:52 +0000
committerPeter Maydell <peter.maydell@linaro.org>2012-04-20 15:38:52 +0000
commitbdac1c1e958c3b0bb1d02e8fb8cc141306eea103 (patch)
treeee19a23f0618d96e2a5bd9de63a8fe7d6526c311 /hw/arm_mptimer.c
parentb1f05696ccc7ee2a04a541e373d098ad17568d13 (diff)
hw/arm_mptimer: Reset the qemu_timer at reset
On reset of the mpcore timer/watchdog block we need to delete the qemu_timer in case it was running. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm_mptimer.c')
-rw-r--r--hw/arm_mptimer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/arm_mptimer.c b/hw/arm_mptimer.c
index df7fb4c9bd..fe43cbb5f1 100644
--- a/hw/arm_mptimer.c
+++ b/hw/arm_mptimer.c
@@ -228,6 +228,9 @@ static void timerblock_reset(timerblock *tb)
tb->control = 0;
tb->status = 0;
tb->tick = 0;
+ if (tb->timer) {
+ qemu_del_timer(tb->timer);
+ }
}
static void arm_mptimer_reset(DeviceState *dev)