#include "sdram.h"
#include "ecc.h"
+DECLARE_GLOBAL_DATA_PTR;
+
#ifdef CONFIG_SDRAM_BANK0
#ifndef CONFIG_440
/*
* Autodetect onboard SDRAM on 405 platforms
*/
-phys_size_t initdram(void)
+int initdram(void)
{
ulong speed;
ulong sdtr1;
/*
* OK, size detected -> all done
*/
- return size;
+ gd->ram_size = size;
+
+ return 0;
}
}
- return 0;
+ return -ENXIO;
}
#else /* CONFIG_440 */
* so this should be extended for other future boards
* using this routine!
*/
-phys_size_t initdram(void)
+int initdram(void)
{
int i;
int tr1_bank1;
/*
* OK, size detected -> all done
*/
- return size;
+ gd->ram_size = size;
+
+ return 0;
}
}
- return 0; /* nothing found ! */
+ return -ENXIO; /* nothing found ! */
}
#endif /* CONFIG_440 */