aboutsummaryrefslogtreecommitdiff
path: root/common/spl
diff options
context:
space:
mode:
authorChanho Park2023-08-29 10:20:14 +0900
committerLeo Yu-Chi Liang2023-09-05 10:53:51 +0800
commitef08687ea0e2b5d57a1df51e6613bc4263747943 (patch)
tree22d8ad93fb84a5320b7051a15141050d2f3db49e /common/spl
parentf39e24496af503c7968cc5e15940701fdf2a0c5b (diff)
spl: add __noreturn attribute to spl_invoke_opensbi function
spl_invoke_opensbi function is not returned to SPL. Thus, we need to set __noreturn function attribute. Signed-off-by: Chanho Park <chanho61.park@samsung.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Diffstat (limited to 'common/spl')
-rw-r--r--common/spl/spl_opensbi.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/common/spl/spl_opensbi.c b/common/spl/spl_opensbi.c
index b0f40076c34..e2aaa460468 100644
--- a/common/spl/spl_opensbi.c
+++ b/common/spl/spl_opensbi.c
@@ -43,11 +43,12 @@ static int spl_opensbi_find_uboot_node(void *blob, int *uboot_node)
return -ENODEV;
}
-void spl_invoke_opensbi(struct spl_image_info *spl_image)
+void __noreturn spl_invoke_opensbi(struct spl_image_info *spl_image)
{
int ret, uboot_node;
ulong uboot_entry;
- void (*opensbi_entry)(ulong hartid, ulong dtb, ulong info);
+ typedef void __noreturn (*opensbi_entry_t)(ulong hartid, ulong dtb, ulong info);
+ opensbi_entry_t opensbi_entry;
if (!spl_image->fdt_addr) {
pr_err("No device tree specified in SPL image\n");
@@ -74,7 +75,7 @@ void spl_invoke_opensbi(struct spl_image_info *spl_image)
opensbi_info.options = CONFIG_SPL_OPENSBI_SCRATCH_OPTIONS;
opensbi_info.boot_hart = gd->arch.boot_hart;
- opensbi_entry = (void (*)(ulong, ulong, ulong))spl_image->entry_point;
+ opensbi_entry = (opensbi_entry_t)spl_image->entry_point;
invalidate_icache_all();
#ifdef CONFIG_SPL_SMP