[PATCH 2/3] plat-nomadik: Added suspend/resume support for MTU timer.
Linus Walleij
linus.ml.walleij at gmail.com
Fri Sep 3 13:37:08 EDT 2010
2010/9/3 Alessandro Rubini <rubini-list at gnudd.com>:
> [Me]
>> Alessandro why do we kick in a prescaler if rate > (16 << 20)?
>> Seems weird to me too when I look at it, more like it'd be
>> if rate (1 << 20) which makes sense, if the counter will flip
>> around 20 bits in 1 second we prescale it by 16.
>
> Your "makes sense" is as subjective as mine. But on 8815, with 2.4MHz
> we overflow in around 1790 seconds. I feel it reasonable. If you
> prescale we get at 150kHz, which is 6.6 usec per tick: I don't like
> that figure too much.
Ah I got it backwards, actually I was thinking along the lines
that since (16 << 20) == (1 << 25) the latter would be more
apropriate thats what I think makes sense, it's so binary...
not (1 << 20) sorry for that.
So (1 << 25) means if bit 25 will switch in one second then
the remaining 7 bits will count less than 127 seconds
so roughly 2 minutes sleep (nice).
On a side note I believe we should then set the minimum range
for mul+div definied at the top of the file to something similar,
like 128.
I'll leave it to Jonas to come up with the best figure(s)!
Yours,
Linus Walleij
More information about the linux-arm-kernel
mailing list