[U-Boot] [PATCH] added autodetect of sdram size and nr of banks for ixp

Wolfgang Denk wd at denx.de
Mon Sep 15 14:30:43 CEST 2008


Dear "Martijn de Gouw",

In message <4CD35CD1F8085945B597F80EEC8942130192DEC8 at exc01.bk.prodrive.nl> you wrote:
> 
> > > +
> > > +#ifdef CFG_SDR_CONFIG
> > >  	mov	r1, #CFG_SDR_CONFIG
> > > +	mov	r9, #0xff
> > > +#else
> > > +	mov	r1, #0x1d /* 256 MB, two banks of 128 MB */
> > > +	mov	r9, #0
> > > +#endif
> > 
> > I don't want such $ifdef's in global code. Why do you thinkthat 2 x
> > 128 MB would be a default configuration for all IXP based boards?
> 
> When CFG_SDR_CONFIG is defined, it holds the memory size, which is set
> in the config.h
> When this value is not set, autodetection is assumed.
> Setting up the board as 2 x 128Mb is used for the autodetection. 

You could set CFG_SDR_CONFIG to that value in your board config file
and avoid the #ifdef ?

> get_ram_size will nog set the memory controller to the correct size.

No, it does not set the size, it auto-detects the size  that  can  be
seen for a specific configuration of the memory controller.

> The ixp can not run C code when memory is not initialized.

Has it not enough on-chip  memory  or  caches  for  that  like  other
processors?

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
Anarchy may not be the best form of government, but it's better  than
no government at all.


More information about the U-Boot mailing list