[PATCH v3 06/11] ARM: vexpress: use clocksource_of_init for sp804
Russell King - ARM Linux
linux at arm.linux.org.uk
Fri Mar 15 08:34:08 EDT 2013
On Wed, Mar 13, 2013 at 11:32:01AM -0500, Rob Herring wrote:
> If you have 2 sp804's, why do you care which one is used by the OS? If
> they are identical, then it doesn't matter. If they are not, then
> describe how they are not identical.
>
> The realview and versatile boards currently do this, but there is no
> good reason that I see and I intend to change this.
It is highly likely that the timer choice on these boards was made by
independent people, who came up with different random choices. Nothing
more than that - I believe it to be entirely arbitary. I do think
discussion is getting too bogged down on this point.
So, we could make the decision about which timer to use for the clock
event based on whether an interrupt is specified, the known clock rate
and size of the timer register.
Same can be done for the clock source, but preferring a timer without
an interrupt in preference to one with an interrupt.
We do have this nice rating system for clocksources and clockevents -
and it could be more flexible if it didn't separate clocksources from
clockevents - allowing just a single "timer" and marking it as being
suitable as a clocksource or a clockevent, or indeed both.
However, for SP804 selection, there are cases where it matters, such as
on Versatile Express where you have to select the right set of SP804 to
have a working system (because ARM didn't fully document the SP804 setup
there) and we have no way to switch some of those timers from their
32kHz clock source. But then we could just omit the clock source for
the "bad" SP804s which would prevent them being used.
More information about the linux-arm-kernel
mailing list