From: Rabin Vincent Date: Sun, 2 May 2010 09:50:52 +0000 (+0530) Subject: arm_timer: fix oneshot mode X-Git-Tag: v0.12.5~38 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=0c459361a1117a6c434c7b2b008a4c6c035eb4bf;p=qemu.git arm_timer: fix oneshot mode In oneshot mode, the delta needs to come from the TimerLoad register, not the maximum limit. Signed-off-by: Rabin Vincent Signed-off-by: Aurelien Jarno (cherry picked from commit a9cf98d939c4f6539fad7e7d812ea16d96ba3dc9) --- diff --git a/hw/arm_timer.c b/hw/arm_timer.c index 5b6947a16..9073ffc00 100644 --- a/hw/arm_timer.c +++ b/hw/arm_timer.c @@ -71,7 +71,7 @@ static void arm_timer_recalibrate(arm_timer_state *s, int reload) { uint32_t limit; - if ((s->control & TIMER_CTRL_PERIODIC) == 0) { + if ((s->control & (TIMER_CTRL_PERIODIC | TIMER_CTRL_ONESHOT)) == 0) { /* Free running. */ if (s->control & TIMER_CTRL_32BIT) limit = 0xffffffff;