summaryrefslogtreecommitdiff
path: root/common/board_f.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-03-31 08:40:32 -0600
committerTom Rini <trini@konsulko.com>2017-04-05 16:36:51 -0400
commit76b00aca4f1c13bc8f91a539e612abc70d0c692f (patch)
tree35f0e984413ef3d44ff50c53e8adc418f10b40e2 /common/board_f.c
parentabf7f4c7040b3914bea327243dcfac0ef840fbaf (diff)
downloadu-boot-76b00aca4f1c13bc8f91a539e612abc70d0c692f.tar.gz
u-boot-76b00aca4f1c13bc8f91a539e612abc70d0c692f.tar.bz2
u-boot-76b00aca4f1c13bc8f91a539e612abc70d0c692f.zip
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 <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'common/board_f.c')
-rw-r--r--common/board_f.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/common/board_f.c b/common/board_f.c
index 75a0fc5df0..1bdc744952 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)