Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O8VoJ-0003Ez-RI for qemu-devel@nongnu.org; Sun, 02 May 2010 05:50:03 -0400 Received: from [140.186.70.92] (port=36363 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O8VoH-0003Ef-Mp for qemu-devel@nongnu.org; Sun, 02 May 2010 05:50:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O8VoG-0007qY-Dv for qemu-devel@nongnu.org; Sun, 02 May 2010 05:50:01 -0400 Received: from mail-pz0-f204.google.com ([209.85.222.204]:50809) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O8VoG-0007qO-1P for qemu-devel@nongnu.org; Sun, 02 May 2010 05:50:00 -0400 Received: by pzk42 with SMTP id 42so808195pzk.4 for ; Sun, 02 May 2010 02:49:58 -0700 (PDT) Sender: Rabin Vincent From: Rabin Vincent Date: Sun, 2 May 2010 15:20:52 +0530 Message-Id: <1272793852-26260-2-git-send-email-rabin@rab.in> In-Reply-To: <1272793852-26260-1-git-send-email-rabin@rab.in> References: <1272793852-26260-1-git-send-email-rabin@rab.in> Subject: [Qemu-devel] [PATCH 2/2] arm_timer: fix oneshot mode List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Rabin Vincent In oneshot mode, the delta needs to come from the TimerLoad register, not the maximum limit. Signed-off-by: Rabin Vincent --- hw/arm_timer.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/arm_timer.c b/hw/arm_timer.c index 5b6947a..9073ffc 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; -- 1.7.0.4