提交 71672b78 编写于 作者: B Bin Meng 提交者: Andes

riscv: Call spl_board_init_f() in the generic SPL board_init_f()

The generic SPL version of board_init_f() should give a call to
board specific codes to initialize board in the SPL phase.
Signed-off-by: NBin Meng <bin.meng@windriver.com>
Reviewed-by: NRick Chen <rick@andestech.com>
Reviewed-by: NPragnesh Patel <pragnesh.patel@sifive.com>
Tested-by: NPragnesh Patel <pragnesh.patel@sifive.com>
上级 cdcf591d
......@@ -28,4 +28,11 @@ enum {
BOOT_DEVICE_NONE
};
/**
* spl_board_init_f() - initialize board in the SPL phase
*
* @return 0 if succeeded, -ve on error
*/
int spl_board_init_f(void);
#endif
......@@ -13,6 +13,11 @@
DECLARE_GLOBAL_DATA_PTR;
__weak int spl_board_init_f(void)
{
return 0;
}
__weak void board_init_f(ulong dummy)
{
int ret;
......@@ -24,6 +29,10 @@ __weak void board_init_f(ulong dummy)
arch_cpu_init_dm();
preloader_console_init();
ret = spl_board_init_f();
if (ret)
panic("spl_board_init_f() failed: %d\n", ret);
}
void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册