mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Tang <dt.tangr@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	John Stultz <john.stultz@linaro.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Arnd Bergmann <arnd@arndb.de>,
	"fabian@ritter-vogt.de Vogt" <fabian@ritter-vogt.de>,
	Lionel Debroux <lionel_debroux@yahoo.fr>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCHv3 4/6] clocksource: Add TI-Nspire timer drivers
Date: Sat, 18 May 2013 16:40:31 +1000	[thread overview]
Message-ID: <6807056B-84F9-468D-87C6-4C4AD7D8BA99@gmail.com> (raw)
In-Reply-To: <CACRpkdaO7ieSdo5+Yq0+CLDfP==+DBOWn8+v0ap5iMOJy0Vf=Q@mail.gmail.com>


On 17/05/2013, at 11:17 PM, Linus Walleij <linus.walleij@linaro.org> wrote:

>>> If this timer is really just 16 bits, it's a *pretty* good idea to use
>>> the prescaler (I guess this is what IO_DIVIDER is) beacuse else you
>>> will get short sleep times with CONFIG_NO_HZ_IDLE on this system,
>>> and wake up unnecessarily often.
>>> 
>>> The same goes for the clock event.
>> 
>> The clock frequency is 32768Hz. Should I be scaling it down at that frequency?
> 
> No. But that was *pretty* slow.
> 
> The thing is that the driver is getting "some clockfrequency" from
> the clk subsystem and does not know what it is.
> 
> Usually (and I've seen this hardware design pattern a lot) when you
> have a clock like this, and go talk to the clk implementation specialist
> s/he will say "oh, yeah, I can mux in this 34 MHz clock to the timer
> as well", and if that is possible then that is often what you want,
> because it's good for things like HRtimers, and then it's useful to have
> a prescaler och the clocksource/clockevent.
> 
> You can use that 32768 Hz for clock events and clocksource (but I
> suspect that HRtimers will never be useful on this platform due to this).
> 

I forgot to mention before that there is also another timer that runs at the same freq as the APB (which is usually around 30MHz). Is this what you were alluding to? I haven't tested the driver on that timer yet.

As I understand it, you're saying to use a prescaler on faster clock rates so the kernel can have a longer maximum delay time (since a 16 bit register can only hold only so much). In that case, what kind of range should I be scaling to? I suspect it needs to be large enough to keep the kernel from constantly waking but small enough for HR timers to be useful.

> Yours,
> Linus Walleij


  reply	other threads:[~2013-05-18  6:40 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-12  4:22 [RFC PATCHv3 0/6] arm: Initial TI-Nspire support Daniel Tang
2013-05-12  4:22 ` [RFC PATCHv3 1/6] " Daniel Tang
2013-05-12  9:06   ` Russell King - ARM Linux
2013-05-12  9:22     ` Daniel Tang
2013-05-12  4:22 ` [RFC PATCHv3 2/6] arm: Add device trees for TI-Nspire Daniel Tang
2013-05-15 14:10   ` Arnd Bergmann
2013-05-12  4:22 ` [RFC PATCHv3 3/6] clk: Add TI-Nspire clock drivers Daniel Tang
2013-05-15 14:07   ` Arnd Bergmann
2013-05-16  8:31     ` Daniel Tang
2013-05-16 12:17       ` Arnd Bergmann
2013-05-19 11:09         ` Daniel Tang
2013-05-19 19:48           ` Arnd Bergmann
2013-05-20 11:19             ` Daniel Tang
2013-05-20 12:26               ` Arnd Bergmann
2013-05-12  4:22 ` [RFC PATCHv3 4/6] clocksource: Add TI-Nspire timer drivers Daniel Tang
2013-05-14  8:03   ` Linus Walleij
2013-05-14 11:51     ` Daniel Tang
2013-05-17 13:17       ` Linus Walleij
2013-05-18  6:40         ` Daniel Tang [this message]
2013-05-20 12:49           ` Linus Walleij
2013-05-12  4:23 ` [RFC PATCHv3 5/6] input: Add TI-Nspire keypad driver Daniel Tang
2013-05-12  4:23 ` [RFC PATCHv3 6/6] irqchip: Add TI-Nspire irqchip Daniel Tang

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=6807056B-84F9-468D-87C6-4C4AD7D8BA99@gmail.com \
    --to=dt.tangr@gmail.com \
    --cc=arnd@arndb.de \
    --cc=fabian@ritter-vogt.de \
    --cc=john.stultz@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=lionel_debroux@yahoo.fr \
    --cc=tglx@linutronix.de \
    /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

all inboxes | Powered by JetHome®