igep00x0: merge igep0020 and igep0030 defconfigs to igep00x0_defconfig
[oweals/u-boot.git] / board / gdsys / mpc8308 / sdram.c
index 0fce8cfbab6002c967bd4b1e72d4f41ac60fd7e6..5d2ec89b8cc9d46e1946fc771319d9a4b5e240fe 100644 (file)
@@ -66,17 +66,19 @@ static long fixed_sdram(void)
        return get_ram_size(CONFIG_SYS_DDR_SDRAM_BASE, msize);
 }
 
-phys_size_t initdram(int board_type)
+int dram_init(void)
 {
        immap_t *im = (immap_t *)CONFIG_SYS_IMMR;
        u32 msize;
 
        if ((in_be32(&im->sysconf.immrbar) & IMMRBAR_BASE_ADDR) != (u32)im)
-               return -1;
+               return -ENXIO;
 
        /* DDR SDRAM */
        msize = fixed_sdram();
 
        /* return total bus SDRAM size(bytes)  -- DDR */
-       return msize;
+       gd->ram_size = msize;
+
+       return 0;
 }