Tony, Santosh,
[...]
> > > > > +void __init omap2_dm_timer_early_init(void)
> > > > > +{
> > > > > +     int ret = omap_hwmod_for_each_by_class("timer",
> > > > > +                     omap_timer_init, NULL);
> > > >
> > > > Here we really only want to initialize the system timer. The
> > rest we
> > > > want to do later, so let's not init all of them early.
> > > So, that is how it was at the beginning.
> > > Later we realized different platforms can use different timers for
> > this.
> > > For example, beagle uses GPT12. Therefore, as part of one of the
> > comments,
> > > We decided to provide flexibility so that any of the timers could
> > be used.
> >
> > You can still do it, just register the one that's being used and
> > mark it reserved so it won't get initialized again later on.
> >
> 
> I agree with Tony. We can still registers only the system
> timer because the timer ID is known well before we do
> initialization.
I must say, there was a gap in my understanding of the comment.
So, here is the implementation change:

-> Call omap2_dm_timer_early_init(u8 gptimer_id) from omap2_gp_timer_init()
-> Initialize only gptimer_id inside this function
-> In the regular init skip initialization of gptimer_id

As a result of this, we can rid of double registration and related code.
--
Tarun
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to