summaryrefslogtreecommitdiffstats
path: root/common/board_f.c
diff options
context:
space:
mode:
authorOvidiu Panait <ovidiu.panait@windriver.com>2020-11-28 10:43:06 +0200
committerTom Rini <trini@konsulko.com>2021-01-15 14:36:11 -0500
commit36716686767dc3e31ad0076d3661d607d66f80c6 (patch)
treeab6eb540dc3cab1cec502c1020c6cc9925fe9307 /common/board_f.c
parent4b9a121fc6fa211a33b693851f55b60954635fce (diff)
downloadu-boot-36716686767dc3e31ad0076d3661d607d66f80c6.tar.gz
u-boot-36716686767dc3e31ad0076d3661d607d66f80c6.tar.xz
u-boot-36716686767dc3e31ad0076d3661d607d66f80c6.zip
common: board_f: Move setup_machine code to setup_bdinfo
setup_bdinfo is used to populate various bdinfo fields, so move setup_machine code there, as all it does is setting gd->bd->bi_arch_number. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/board_f.c')
-rw-r--r--common/board_f.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/common/board_f.c b/common/board_f.c
index 3c4437341a..fbf622e0f0 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -503,14 +503,6 @@ static int reserve_board(void)
return 0;
}
-static int setup_machine(void)
-{
-#ifdef CONFIG_MACH_TYPE
- gd->bd->bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */
-#endif
- return 0;
-}
-
static int reserve_global_data(void)
{
gd->start_addr_sp = reserve_stack_aligned(sizeof(gd_t));
@@ -605,6 +597,10 @@ int setup_bdinfo(void)
bd->bi_sramsize = CONFIG_SYS_SRAM_SIZE; /* size of SRAM */
}
+#ifdef CONFIG_MACH_TYPE
+ bd->bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */
+#endif
+
return arch_setup_bdinfo();
}
@@ -916,7 +912,6 @@ static const init_fnc_t init_sequence_f[] = {
reserve_uboot,
reserve_malloc,
reserve_board,
- setup_machine,
reserve_global_data,
reserve_fdt,
reserve_bootstage,