diff mbox series

spl: riscv: opensbi: fix check of PAYLOAD_ARGS_ADDR

Message ID 20240322113637.2217932-1-randolph@andestech.com
State Accepted
Commit 0cfe1bc6ed9b322d2b03ded3175ac5de3ed2b784
Delegated to: Andes
Headers show
Series spl: riscv: opensbi: fix check of PAYLOAD_ARGS_ADDR | expand

Commit Message

Randolph March 22, 2024, 11:36 a.m. UTC
When Falcon Mode is enabled on RISC-V, use CONFIG_VAL
to check PAYLOAD_ARGS_ADDR, not CONFIG_IS_ENABLED.

Signed-off-by: Randolph <randolph@andestech.com>
---
 common/spl/spl_opensbi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Leo Liang March 26, 2024, 8:28 a.m. UTC | #1
On Fri, Mar 22, 2024 at 07:36:37PM +0800, Randolph wrote:
> When Falcon Mode is enabled on RISC-V, use CONFIG_VAL
> to check PAYLOAD_ARGS_ADDR, not CONFIG_IS_ENABLED.
> 
> Signed-off-by: Randolph <randolph@andestech.com>
> ---
>  common/spl/spl_opensbi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Tested-by: Leo Yu-Chi Liang <ycliang@andestech.com>
diff mbox series

Patch

diff --git a/common/spl/spl_opensbi.c b/common/spl/spl_opensbi.c
index 8127ebc946..ec62aab929 100644
--- a/common/spl/spl_opensbi.c
+++ b/common/spl/spl_opensbi.c
@@ -66,7 +66,7 @@  void __noreturn spl_invoke_opensbi(struct spl_image_info *spl_image)
 	 * Moving DTB in front of the kernel can avoid the error.
 	 */
 #if CONFIG_IS_ENABLED(LOAD_FIT_OPENSBI_OS_BOOT) && \
-    CONFIG_IS_ENABLED(PAYLOAD_ARGS_ADDR)
+    CONFIG_VAL(PAYLOAD_ARGS_ADDR)
 	memcpy((void *)CONFIG_SPL_PAYLOAD_ARGS_ADDR, spl_image->fdt_addr,
 	       fdt_totalsize(spl_image->fdt_addr));
 	spl_image->fdt_addr = map_sysmem(CONFIG_SPL_PAYLOAD_ARGS_ADDR, 0);