summaryrefslogtreecommitdiff
path: root/common/spl/spl_fit.c
diff options
context:
space:
mode:
authorRandolph <[email protected]>2023-10-12 14:35:07 +0800
committerLeo Yu-Chi Liang <[email protected]>2023-10-19 17:29:33 +0800
commit58fa2a5aa164fd8b516bd66649bbb595ebf1540c (patch)
tree4c08bb463fd6c669119d57f3b5b2e04c74503b01 /common/spl/spl_fit.c
parent9421e419817a2a86ad73995ff3ffd0957bec7b82 (diff)
spl: riscv: add os type for next booting stage
If SPL_LOAD_FIT_OPENSBI_OS_BOOT is enabled, the function spl_invoke_opensbi should change the target OS type to IH_OS_LINUX. OpenSBI will load the Linux image as the next boot stage. The os_takes_devicetree function returns a value of true or false depending on whether or not SPL_LOAD_FIT_OPENSBI_OS_BOOT is enabled. Signed-off-by: Randolph <[email protected]> Reviewed-by: Simon Glass <[email protected]>
Diffstat (limited to 'common/spl/spl_fit.c')
-rw-r--r--common/spl/spl_fit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
index c026e1a1945..70d8d5942d9 100644
--- a/common/spl/spl_fit.c
+++ b/common/spl/spl_fit.c
@@ -367,7 +367,8 @@ static bool os_takes_devicetree(uint8_t os)
case IH_OS_U_BOOT:
return true;
case IH_OS_LINUX:
- return IS_ENABLED(CONFIG_SPL_OS_BOOT);
+ return IS_ENABLED(CONFIG_SPL_OS_BOOT) ||
+ IS_ENABLED(CONFIG_SPL_OPENSBI);
default:
return false;
}