[PATCH 1/3] ARM: OMAP2+: 32k-counter: Use hwmod lookup to check presence of 32k timer

Ming Lei tom.leiming at gmail.com
Fri Mar 23 04:20:25 EDT 2012


On Wed, Mar 21, 2012 at 7:29 PM, Hiremath, Vaibhav <hvaibhav at ti.com> wrote:
> On Mon, Mar 19, 2012 at 17:14:30, Ming Lei wrote:
>> On Mon, Mar 19, 2012 at 7:11 PM, Hiremath, Vaibhav <hvaibhav at ti.com> wrote:
>> >
>> > I think you made very good point here. With the above patch, we are almost missing the capability of registering dmtimer as a clocksource for OMAP.
>> > It will always use 32k-counter, and never fall back to dmtimer.
>> >
>> > Then the only options we have here is,
>> >
>> > 1) Register both the timers, 32k-counter and dmtimer for clocksource; let
>> >   Kernel pick up best rating clocksource out of these two.
>> >
>> >   In case of OMAP1/2/3/4, kernel will use dmtimer, since it has better
>> >   Rating. User can choose the 32k-counter clocksource via bootargs.
>> >
>> >   Impact: without bootargs for clocksource selection, kernel will choose
>> >     dmtimer, impacting loss of time during suspend/resume.
>> >
>> >
>> > 2) Let the current code be as is, means, the clocksource registration will
>> >   Happened based on "#ifdef CONFIG_OMAP_32K_TIMER" and this option
>> >   selection will be Controlled by Kconfig rules.
>>
>> How about the 3rd option?
>>
>> 3), take the way in your patch 1) at default, but will switch to
>> register dmtimer
>> directly and bypass 32k-counter if user need it via kernel parameter.
>>
>> As far as I can think of, the situations required for dmtimer are high-frequency
>> perf sample and high precision trace points, so looks it is OK to take
>> 32k-counter
>> at default.
>>
> But if you register both the timers (dmtimer & 32ksync), then initially kernel will only pick up dmtimer, as this has better rating. And late in

Looks not so, I found that 32ksync is always selected as the default
clocksource if both are registered.

> the boot sequence clocksource switch will happen, base on
> kernel parameter (clocksource=).
>
> So logically dmtimer will be always used as a default here.

Not so at least on my Pandaboard.


Thanks,
-- 
Ming Lei



More information about the linux-arm-kernel mailing list