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

Martijn de Gouw martijn.de.gouw at prodrive.nl
Mon Sep 15 13:16:40 CEST 2008


Hi Wolfgang

> > +
> > +#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. 

> 
> > +sdr_init:

/* snip */

> > +sdr_init_done:
> 
> This whole test makes not much sense to me. I think the code should be
> changed to use the standard get_ram_size() funciton instead (see
> common/memsize.c).

get_ram_size will nog set the memory controller to the correct size.
The ixp can not run C code when memory is not initialized.

Maybe it could be used as a replacement for the code in pdnb.c yes.
 
Regards, Martijn

Disclaimer: The information contained in this email, including any attachments is 
confidential and is for the sole use of the intended recipient(s). Any unauthorized 
review, use, disclosure or distribution is prohibited. If you are not the intended 
recipient, please notify the sender immediately by replying to this message and 
destroy all copies of this message and any attachments.


More information about the U-Boot mailing list