diff options
Diffstat (limited to 'board/esd')
-rw-r--r-- | board/esd/mecp5123/mecp5123.c | 6 | ||||
-rw-r--r-- | board/esd/pmc440/sdram.c | 12 | ||||
-rw-r--r-- | board/esd/vme8349/vme8349.c | 10 |
3 files changed, 19 insertions, 9 deletions
diff --git a/board/esd/mecp5123/mecp5123.c b/board/esd/mecp5123/mecp5123.c index b8eb32b1fb7..80963fefa50 100644 --- a/board/esd/mecp5123/mecp5123.c +++ b/board/esd/mecp5123/mecp5123.c @@ -62,9 +62,11 @@ int board_early_init_f(void) return 0; } -phys_size_t initdram(void) +int initdram(void) { - return get_ram_size(0, fixed_sdram(NULL, NULL, 0)); + gd->ram_size = get_ram_size(0, fixed_sdram(NULL, NULL, 0)); + + return 0; } int misc_init_r(void) diff --git a/board/esd/pmc440/sdram.c b/board/esd/pmc440/sdram.c index 82ee289aa61..e962d4c4bb4 100644 --- a/board/esd/pmc440/sdram.c +++ b/board/esd/pmc440/sdram.c @@ -24,6 +24,8 @@ #include <asm/mmu.h> #include <asm/ppc440.h> +DECLARE_GLOBAL_DATA_PTR; + extern int denali_wait_for_dlllock(void); extern void denali_core_search_data_eye(void); @@ -105,7 +107,7 @@ int initdram_by_rb(int rows, int banks) return 0; } -phys_size_t initdram(void) +int initdram(void) { phys_size_t size; int n; @@ -125,12 +127,14 @@ phys_size_t initdram(void) sdram_conf[n].banks); /* check for suitable configuration */ - if (get_ram_size(CONFIG_SYS_SDRAM_BASE, size) == size) - return size; + if (get_ram_size(CONFIG_SYS_SDRAM_BASE, size) == size) { + gd->ram_size = size; + return 0; + } /* delete TLB entries */ remove_tlb(CONFIG_SYS_SDRAM_BASE, size); } - return 0; + return -ENXIO; } diff --git a/board/esd/vme8349/vme8349.c b/board/esd/vme8349/vme8349.c index bf6ee7a73dc..0e7f8b130a3 100644 --- a/board/esd/vme8349/vme8349.c +++ b/board/esd/vme8349/vme8349.c @@ -26,15 +26,17 @@ #include <i2c.h> #include <netdev.h> +DECLARE_GLOBAL_DATA_PTR; + void ddr_enable_ecc(unsigned int dram_size); -phys_size_t initdram(void) +int initdram(void) { volatile immap_t *im = (immap_t *)CONFIG_SYS_IMMR; u32 msize = 0; if ((im->sysconf.immrbar & IMMRBAR_BASE_ADDR) != (u32)im) - return -1; + return -ENXIO; /* DDR SDRAM - Main memory */ im->sysconf.ddrlaw[0].bar = CONFIG_SYS_DDR_BASE & LAWBAR_BAR; @@ -52,7 +54,9 @@ phys_size_t initdram(void) msize = get_ram_size(0, msize); /* return total bus SDRAM size(bytes) -- DDR */ - return msize * 1024 * 1024; + gd->ram_size = msize * 1024 * 1024; + + return 0; } int checkboard(void) |