**********************************************************************************/
#include <common.h>
+#include <console.h>
#include <mpc5xx.h>
#include <stdio_dev.h>
#include <pci_ids.h>
asm (GEN_SYMNAME(name) " = " GEN_VALUE(value))
+DECLARE_GLOBAL_DATA_PTR;
+
/************************************************************************
* Early debug routines
*/
/*
* Get RAM size.
*/
-phys_size_t initdram(int board_type)
+int dram_init(void)
{
unsigned char board_rev;
unsigned long reg;
/* we have a x32 bit bus to the SDRAM, so shift the addr with 2 */
lmr<<=2;
in32(CONFIG_SYS_SDRAM_BASE + lmr);
- /* ok, we're done, return SDRAM size */
- return ((0x400000 << sdram_table[i].sz)); /* log2 value of 4MByte */
+ /* ok, we're done, set SDRAM size to log2 value of 4MByte*/
+ gd->ram_size = 0x400000 << sdram_table[i].sz;
+
+ return 0;
}