From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ovidiu Panait Date: Thu, 5 Nov 2020 11:09:40 +0200 Subject: [PATCH 03/18] common: board_f: Move setup_machine code to setup_bdinfo In-Reply-To: <20201105090955.29641-1-ovidiu.panait@windriver.com> References: <20201105090955.29641-1-ovidiu.panait@windriver.com> Message-ID: <20201105090955.29641-4-ovidiu.panait@windriver.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- common/board_f.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/common/board_f.c b/common/board_f.c index a3c353a4b5..408b95826a 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, -- 2.17.1