From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37675) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHESB-0003lS-Pu for qemu-devel@nongnu.org; Thu, 07 Jan 2016 12:34:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aHESA-0005Ew-Vj for qemu-devel@nongnu.org; Thu, 07 Jan 2016 12:34:27 -0500 References: <20160106131744.GE4227@pcrost-box> From: Dmitry Osipenko Message-ID: <568EA189.8080804@gmail.com> Date: Thu, 7 Jan 2016 20:34:01 +0300 MIME-Version: 1.0 In-Reply-To: <20160106131744.GE4227@pcrost-box> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v8 4/4] arm_mptimer: Convert to use ptimer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: Peter Maydell , qemu-arm@nongnu.org, QEMU Developers 06.01.2016 16:17, Peter Crosthwaite пишет: >> + if ((old & 3) != (tb->control & 3)) { >> + ptimer_stop(tb->timer); >> + } >> + if (!(tb->control & 1)) { >> + break; >> + } >> + ptimer_set_period(tb->timer, timerblock_scale(tb)); >> + if ((old & 3) != (tb->control & 3)) { >> + value = ptimer_get_count(tb->timer); >> + timerblock_run(tb, value, 1); > > Is this reachable when the load value is still 0? > Yes, timer runs based on current counter value. You can load = 0 and set counter != 0 that would result in one-shot tick. Hmm... I need to fix it. Thanks for leading question! Ughh... just noticed that test_timer_set_oneshot_count_to_0() on real HW sets IT bit if prescaler != 0. Looking into it.. -- Dmitry