Dear "Hiremath, Vaibhav", In message <19f8576c6e063c45be387c64729e7394044e351...@dbde02.ent.ti.com> you wrote: > > > > diff --git a/arch/arm/include/asm/arch-omap3/cpu.h > > b/arch/arm/include/asm/arch-omap3/cpu.h > > > index aa8de32..a49af10 100644 > > > --- a/arch/arm/include/asm/arch-omap3/cpu.h > > > +++ b/arch/arm/include/asm/arch-omap3/cpu.h > > > @@ -183,6 +183,7 @@ struct sms { > > > /* SDRC */ > > > #ifndef __KERNEL_STRICT_NAMES > > > #ifndef __ASSEMBLY__ > > > +#if defined(CONFIG_SDRC) > > > struct sdrc_cs { > > > u32 mcfg; /* 0x80 || 0xB0 */ > > > u32 mr; /* 0x84 || 0xB4 */ > > > @@ -215,6 +216,8 @@ struct sdrc { > > > u8 res4[0xC]; > > > struct sdrc_cs cs[2]; /* 0x80 || 0xB0 */ > > > }; > > > + > > > +#endif /* CONFIG_SDRC */ > > > > I don't like such a #ifdef here - it is absolutely necessary? Why? > > > [Hiremath, Vaibhav] Denk, > > This is common file being used for all OMAP series of devices (OMAP2, OMAP3 > and AM35x family) and OMAP2/3 family supports SDRC controller and AM35x fa > mily support EMIF4. > > And due to this difference we need to add this #ifdef.
No. If different CPU fmilies need different versions of this struct then they should use separate header files for these. > > > diff --git a/arch/arm/include/asm/arch-omap3/sys_proto.h > > b/arch/arm/include/asm/arch-omap3/sys_proto.h > > > index 34bd515..34e4e0d 100644 > > > --- a/arch/arm/include/asm/arch-omap3/sys_proto.h > > > +++ b/arch/arm/include/asm/arch-omap3/sys_proto.h > > > @@ -31,8 +31,10 @@ void prcm_init(void); > > > void per_clocks_enable(void); > > > > > > void memif_init(void); > > > +#if defined(CONFIG_SDRC) > > > void sdrc_init(void); > > > void do_sdrc_init(u32, u32); > > > +#endif > > > > Ditto - please drop this #ifdef. > > > [Hiremath, Vaibhav] Same as above. Even less so here. The prototypes should not do any harm - just remove the #if/#endif Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de "Ahead warp factor 1" - Captain Kirk _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot