From 76b00aca4f1c13bc8f91a539e612abc70d0c692f Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 31 Mar 2017 08:40:32 -0600 Subject: board_f: Drop setup_dram_config() wrapper By making dram_init_banksize() return an error code we can drop the wrapper. Adjust this and clean up all implementations. Signed-off-by: Simon Glass Reviewed-by: Stefan Roese --- common/board_f.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'common') diff --git a/common/board_f.c b/common/board_f.c index 75a0fc5..1bdc744 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -208,12 +208,14 @@ static int show_dram_config(void) return 0; } -__weak void dram_init_banksize(void) +__weak int dram_init_banksize(void) { #if defined(CONFIG_NR_DRAM_BANKS) && defined(CONFIG_SYS_SDRAM_BASE) gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE; gd->bd->bi_dram[0].size = get_effective_memsize(); #endif + + return 0; } #if defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C) @@ -644,14 +646,6 @@ static int init_post(void) } #endif -static int setup_dram_config(void) -{ - /* Ram is board specific, so move it to board code ... */ - dram_init_banksize(); - - return 0; -} - static int reloc_fdt(void) { #ifndef CONFIG_OF_EMBED @@ -891,7 +885,7 @@ static const init_fnc_t init_sequence_f[] = { reserve_fdt, reserve_arch, reserve_stacks, - setup_dram_config, + dram_init_banksize, show_dram_config, #if defined(CONFIG_M68K) || defined(CONFIG_MIPS) || defined(CONFIG_PPC) || \ defined(CONFIG_SH) -- cgit v1.1