[U-Boot] [PATCH 5/7] OMAP5: EMIF: Add support for DDR3 device

Tom Rini trini at ti.com
Thu May 24 15:46:59 CEST 2012


On Thu, May 24, 2012 at 12:15:23PM +0530, R, Sricharan wrote:
> Hi Tom,
[snip]
> > ?I'm going to try and locally make the ddr3 patches work on the am33xx DDR3
> > board as a way to prove that out and if it works, and we're fine with what
> > I've laid out above, start working towards that layout.
> >
>  yeah, sounds correct.
>   How about something like this, similar to the above
> #define DDR2 1
> #define LPDDR2 2
> #define DDR3 3
> #define LPDDR3 4
> 
> and soc specific code returns the correct ddr type. For OMAP
> get_ddr_type()
> {
>  switch(EMIF_SDRAM_CONFIG & SDRAM_TYPE) {
>  case 3:
>      return DDR3;
>  case 4:
>  case 5:
>  default:
>     return LPDDR2;
> }
> We can avoid the #ifdef s in the emif code and use the type returned by
> SOC to do the required initialisations. ?

One thing I want to avoid is bloating each of the boards with DDR config
code it won't ever use.  OMAP4/5 won't have DDR2 and AM33xx won't have
LPDDR2.  But maybe there's some linker magic we can do to avoid #ifdefs.

-- 
Tom


More information about the U-Boot mailing list