diff options
author | Simon Glass <sjg@chromium.org> | 2017-03-31 14:40:25 (GMT) |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-04-05 17:59:20 (GMT) |
commit | 088454cde245b4d431ce0181be8b3cbceea059d6 (patch) | |
tree | ec86ebe66961c9b06ab4b39ec83fd81d4a86e9be /board/esd/pmc440/sdram.c | |
parent | 52c411805c090999f015df8bdf8016fb684746d0 (diff) | |
download | u-boot-fsl-qoriq-088454cde245b4d431ce0181be8b3cbceea059d6.tar.xz |
board_f: Drop return value from initdram()
At present we cannot use this function as an init sequence call without a
wrapper, since it returns the RAM size. Adjust it to set the RAM size in
global_data instead, and return 0 on success.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'board/esd/pmc440/sdram.c')
-rw-r--r-- | board/esd/pmc440/sdram.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/board/esd/pmc440/sdram.c b/board/esd/pmc440/sdram.c index 82ee289..e962d4c 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; } |