[U-Boot] [PATCH-V2 2/4] omap3: Consolidate SDRC related operations
Wolfgang Denk
wd at denx.de
Thu May 6 12:55:09 CEST 2010
Dear "Hiremath, Vaibhav",
In message <19F8576C6E063C45BE387C64729E7394044E351BE0 at 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: wd at denx.de
"Ahead warp factor 1" - Captain Kirk
More information about the U-Boot
mailing list