[U-Boot-Users] question about sdram size autodetection in sdram_init()

SYLee dobest03 at empal.com
Thu Jul 15 04:04:53 CEST 2004

I'm so sorry for producing mailing list garbages..
due to email client problem..
My apology to you all for this..

In cpu/ppc4xx/sdram.c, in sdram_init(), the following seems to be wrong.

* Test if 128 MByte are equipped (mirror test)
*(volatile ulong *)ADDR_ZERO = MAGIC0;
*(volatile ulong *)ADDR_08MB = MAGIC1;
*(volatile ulong *)ADDR_16MB = MAGIC2;
*(volatile ulong *)ADDR_32MB = MAGIC3;
*(volatile ulong *)ADDR_64MB = MAGIC4;

if ((*(volatile ulong *)ADDR_ZERO == MAGIC0) &&
    (*(volatile ulong *)ADDR_08MB == MAGIC1) &&
    (*(volatile ulong *)ADDR_16MB == MAGIC2) &&
    (*(volatile ulong *)ADDR_32MB == MAGIC3)) {
* OK, 128MB detected -> all done

I think the following conditional expression must be inserted at if statement:
(*(volatile ulong *)ADDR_64MB == MAGIC4)

The above case is also applied to 64MB and 32MB detection.


Get your own 200MB free email at http://www.empal.com

More information about the U-Boot mailing list