From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=51379 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OFP3C-0006Ps-KD for qemu-devel@nongnu.org; Fri, 21 May 2010 06:02:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OFP2N-00014J-Cq for qemu-devel@nongnu.org; Fri, 21 May 2010 06:01:04 -0400 Received: from hall.aurel32.net ([88.191.82.174]:51605) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OFP2N-00014E-5O for qemu-devel@nongnu.org; Fri, 21 May 2010 06:01:03 -0400 Date: Fri, 21 May 2010 12:00:49 +0200 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH 2/2] arm_timer: fix oneshot mode Message-ID: <20100521100049.GD23891@volta.aurel32.net> References: <1272793852-26260-1-git-send-email-rabin@rab.in> <1272793852-26260-2-git-send-email-rabin@rab.in> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1272793852-26260-2-git-send-email-rabin@rab.in> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Rabin Vincent Cc: qemu-devel@nongnu.org On Sun, May 02, 2010 at 03:20:52PM +0530, Rabin Vincent wrote: > In oneshot mode, the delta needs to come from the TimerLoad register, > not the maximum limit. > > Signed-off-by: Rabin Vincent Thanks, applied. > --- > 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 > > > > -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net