[PATCH v2] riscv: ae350: Use #if defined instead of CONFIG_IS_ENABLED

Leo Yu-Chi Liang ycliang at andestech.com
Mon Nov 1 10:00:43 CET 2021


According to ./include/linux/kconfig.h,
CONFIG_IS_ENABLED(OF_BOARD) expands to 0
when CONFIG_SPL_BUILD is defined because
there is no CONFIG_SPL_OF_BOARD.

Use #if defined instead.

Fixes: 2e8d2f88439d ("riscv: Remove OF_PRIOR_STAGE from RISC-V boards")

Signed-off-by: Leo Yu-Chi Liang <ycliang at andestech.com>
Reviewed-by: Rick Chen <rick at andestech.com>
Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
---
 board/AndesTech/ax25-ae350/ax25-ae350.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/board/AndesTech/ax25-ae350/ax25-ae350.c b/board/AndesTech/ax25-ae350/ax25-ae350.c
index b28894ed46..58bf236497 100644
--- a/board/AndesTech/ax25-ae350/ax25-ae350.c
+++ b/board/AndesTech/ax25-ae350/ax25-ae350.c
@@ -56,9 +56,9 @@ ulong board_flash_get_legacy(ulong base, int banknum, flash_info_t *info)
 
 void *board_fdt_blob_setup(void)
 {
-#if CONFIG_IS_ENABLED(OF_BOARD)
+#if defined(CONFIG_OF_BOARD)
 	return (void *)(ulong)gd->arch.firmware_fdt_addr;
-#elif CONFIG_IS_ENABLED(OF_SEPARATE)
+#elif defined(CONFIG_OF_SEPARATE)
 	return (void *)CONFIG_SYS_FDT_BASE;
 #else
 	return NULL;
-- 
2.17.0



More information about the U-Boot mailing list