From: Dmitry Osipenko <digetx@gmail.com>
To: Peter Crosthwaite <crosthwaitepeter@gmail.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
qemu-arm@nongnu.org, QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v8 4/4] arm_mptimer: Convert to use ptimer
Date: Thu, 7 Jan 2016 20:34:01 +0300 [thread overview]
Message-ID: <568EA189.8080804@gmail.com> (raw)
In-Reply-To: <20160106131744.GE4227@pcrost-box>
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
prev parent reply other threads:[~2016-01-07 17:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-05 2:33 [Qemu-devel] [PATCH v8 0/4] PTimer fixes and ARM MPTimer conversion Dmitry Osipenko
2016-01-05 2:33 ` [Qemu-devel] [PATCH v8 1/4] hw/ptimer: Fix issues caused by the adjusted timer limit value Dmitry Osipenko
2016-01-06 12:15 ` Peter Crosthwaite
2016-01-06 13:25 ` Dmitry Osipenko
2016-01-06 13:38 ` Peter Crosthwaite
2016-01-05 2:33 ` [Qemu-devel] [PATCH v8 2/4] hw/ptimer: Perform tick and counter wrap around if timer already expired Dmitry Osipenko
2016-01-06 12:17 ` Peter Crosthwaite
2016-01-06 13:12 ` Dmitry Osipenko
2016-01-06 13:59 ` Peter Crosthwaite
2016-01-06 20:52 ` Dmitry Osipenko
2016-01-05 2:33 ` [Qemu-devel] [PATCH v8 3/4] hw/ptimer: Update .delta on period/freq change Dmitry Osipenko
2016-01-06 12:17 ` Peter Crosthwaite
2016-01-05 2:33 ` [Qemu-devel] [PATCH v8 4/4] arm_mptimer: Convert to use ptimer Dmitry Osipenko
2016-01-06 13:17 ` Peter Crosthwaite
2016-01-07 14:40 ` Dmitry Osipenko
2016-01-07 17:34 ` Dmitry Osipenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=568EA189.8080804@gmail.com \
--to=digetx@gmail.com \
--cc=crosthwaitepeter@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).