Hi all,

This is a patch for cpu/ppc4xx/sdram.c for auto sdram size detection:

--- u-boot-1.1.1/cpu/ppc4xx/sdram.c 2003-09-12 17:49:58.000000000 +0900
+++ u-boot-patched/cpu/ppc4xx/sdram.c 2004-07-16 16:23:44.000000000 +0900
@@ -122,7 +122,8 @@
if ((*(volatile ulong *)ADDR_ZERO == MAGIC0) &&
    (*(volatile ulong *)ADDR_08MB == MAGIC1) &&
    (*(volatile ulong *)ADDR_16MB == MAGIC2) &&
-     (*(volatile ulong *)ADDR_32MB == MAGIC3)) {
+     (*(volatile ulong *)ADDR_32MB == MAGIC3) &&
+     (*(volatile ulong *)ADDR_64MB == MAGIC4)) {
/*
* OK, 128MB detected -> all done
*/
@@ -173,7 +174,8 @@

if ((*(volatile ulong *)ADDR_ZERO == MAGIC0) &&
    (*(volatile ulong *)ADDR_08MB == MAGIC1) &&
-     (*(volatile ulong *)ADDR_16MB == MAGIC2)) {
+     (*(volatile ulong *)ADDR_16MB == MAGIC2) &&
+     (*(volatile ulong *)ADDR_32MB == MAGIC3)) {
/*
* OK, 64MB detected -> all done
*/
@@ -216,7 +218,8 @@

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

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