Subject: [PATCH 12/14] omap2/3: Fix initcalls for multi-omap

From: [email-masked] (Tony Lindgren)
Date: Thu, 19 Aug 2010 12:35:49 +0300

* Alexander Shishkin <[email-masked]> [100819 12:04]:
> On Tue, Jan 26, 2010 at 12:13:04 -0800, Tony Lindgren wrote:
> > Otherwise the wrong initcalls can run.
> > 
> > Signed-off-by: Tony Lindgren <[email-masked]>
> > ---
> >  arch/arm/mach-omap2/clock2xxx.c |    2 +-
> >  arch/arm/mach-omap2/clock34xx.c |    2 +-
> >  arch/arm/mach-omap2/emu.c       |    3 +++
> 
> May I ask what stopped you from CCing me on this patch?

Hmm, sorry I don't follow you. Did I accidentally leave out something?

Regards,

Tony

> >  3 files changed, 5 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/arm/mach-omap2/clock2xxx.c b/arch/arm/mach-omap2/clock2xxx.c
> > index 43e7404..1a31b72 100644
> > --- a/arch/arm/mach-omap2/clock2xxx.c
> > +++ b/arch/arm/mach-omap2/clock2xxx.c
> > @@ -598,7 +598,7 @@ static int __init omap2_clk_arch_init(void)
> >  	struct clk *virt_prcm_set, *sys_ck, *dpll_ck, *mpu_ck;
> >  	unsigned long sys_ck_rate;
> >  
> > -	if (!mpurate)
> > +	if (!(cpu_is_omap24xx() && mpurate))
> >  		return -EINVAL;
> >  
> >  	virt_prcm_set = clk_get(NULL, "virt_prcm_set");
> > diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c
> > index f485a89..03720bc 100644
> > --- a/arch/arm/mach-omap2/clock34xx.c
> > +++ b/arch/arm/mach-omap2/clock34xx.c
> > @@ -317,7 +317,7 @@ static int __init omap2_clk_arch_init(void)
> >  	struct clk *osc_sys_ck, *dpll1_ck, *arm_fck, *core_ck;
> >  	unsigned long osc_sys_rate;
> >  
> > -	if (!mpurate)
> > +	if (!(cpu_is_omap34xx() && mpurate))
> >  		return -EINVAL;
> >  
> >  	/* XXX test these for success */
> > diff --git a/arch/arm/mach-omap2/emu.c b/arch/arm/mach-omap2/emu.c
> > index ec0d984..9c442e2 100644
> > --- a/arch/arm/mach-omap2/emu.c
> > +++ b/arch/arm/mach-omap2/emu.c
> > @@ -56,6 +56,9 @@ static struct amba_device omap3_etm_device = {
> >  
> >  static int __init emu_init(void)
> >  {
> > +	if (!cpu_is_omap34xx())
> > +		return -ENODEV;
> > +
> >  	amba_device_register(&omap3_etb_device, &iomem_resource);
> >  	amba_device_register(&omap3_etm_device, &iomem_resource);
> >  
> > 
> > 
> 
> Regards,
> --
> Alex