[PATCH 08/10] OMAP: split plat-omap/common.c
Tony Lindgren
tony at atomide.com
Mon Oct 4 14:27:00 EDT 2010
* Varadarajan, Charulatha <charu at ti.com> [101004 01:20]:
> Paul,
>
> <<snip>>
>
> >
> > > > +static int __init omap_init_clocksource_32k(void)
> > > > +{
> > > > + static char err[] __initdata = KERN_ERR
> > > > + "%s: can't register clocksource!\n";
> > > > +
> > > > + if (cpu_is_omap16xx() || cpu_class_is_omap2()) {
> > > > + struct clk *sync_32k_ick;
> > > > +
> > > > + if (cpu_is_omap16xx())
> > >
> > > Avoid cpu_is* checks in plat-omap.
> >
> > OK, I'll bite. Why?
>
> I think this is being looked for all the new code introduced
> in plat-omap layer for the following reasons:
> Adding cpu-is-* checks makes code unmaintainable going fwd.
> plat-omap layer needs to handle common code for all omap platforms.
>
> This was raised for GPIO driver because of which, there was a
> requirement to clean-up the gpio driver.
>
> Is this stand changed? Are cpu_is* checks allowed in plat-omap?
We should only need to do cpu_is* checks in arch/arm/mach-omap2,
and only in few places during the init.
However, this patch series moves around the existing code to
avoid having oma2plus specific code be in plat-omap.
Again, further patches can be done easily on this.
Tony
More information about the linux-arm-kernel
mailing list