提交 f32e79f1 编写于 作者: M Michal Simek

arm64: zynqmp: Propagate error value from psu_init()

psu_init() returns int which wasn't declared and checked.
The patch is fixing function declarations and code to handle return
values properly.
Signed-off-by: NMichal Simek <michal.simek@xilinx.com>
上级 7109930a
......@@ -129,12 +129,13 @@ u32 spl_boot_mode(const u32 boot_device)
}
}
__weak void psu_init(void)
__weak int psu_init(void)
{
/*
* This function is overridden by the one in
* board/xilinx/zynqmp/(platform)/psu_init_gpl.c, if it exists.
*/
return -1;
}
#ifdef CONFIG_SPL_OS_BOOT
......
......@@ -33,7 +33,7 @@ enum {
int zynq_board_read_rom_ethaddr(unsigned char *ethaddr);
unsigned int zynqmp_get_silicon_version(void);
void psu_init(void);
int psu_init(void);
void handoff_setup(void);
......
......@@ -237,15 +237,16 @@ static char *zynqmp_get_silicon_idcode_name(void)
int board_early_init_f(void)
{
int ret = 0;
#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_CLK_ZYNQMP)
zynqmp_pmufw_version();
#endif
#if defined(CONFIG_SPL_BUILD) || defined(CONFIG_ZYNQMP_PSU_INIT_ENABLED)
psu_init();
ret = psu_init();
#endif
return 0;
return ret;
}
#define ZYNQMP_VERSION_SIZE 9
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册