aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-09-26 08:14:21 -0600
committerTom Rini <trini@konsulko.com>2023-10-06 14:38:12 -0400
commite0be6eaf581d06af788509e588129c4dbae967d2 (patch)
treea6504124733239b2e7d96533e43c10d377f7a35e /common
parent6371c47999ea78d00cf98028ced210bea8337711 (diff)
downloadu-boot-e0be6eaf581d06af788509e588129c4dbae967d2.zip
u-boot-e0be6eaf581d06af788509e588129c4dbae967d2.tar.gz
u-boot-e0be6eaf581d06af788509e588129c4dbae967d2.tar.bz2
spl: Avoid #ifdef with CONFIG_SPL_PAYLOAD_ARGS_ADDR
Move the condition to the header file to improve readability. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/spl/spl.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 530ade5..8ed2eeb 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -806,9 +806,8 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
}
memset(&spl_image, '\0', sizeof(spl_image));
-#ifdef CONFIG_SPL_PAYLOAD_ARGS_ADDR
- spl_image.arg = (void *)CONFIG_SPL_PAYLOAD_ARGS_ADDR;
-#endif
+ if (IS_ENABLED(CONFIG_SPL_OS_BOOT))
+ spl_image.arg = (void *)SPL_PAYLOAD_ARGS_ADDR;
spl_image.boot_device = BOOT_DEVICE_NONE;
board_boot_order(spl_boot_list);
@@ -865,9 +864,8 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
#if CONFIG_IS_ENABLED(OS_BOOT)
case IH_OS_LINUX:
debug("Jumping to Linux\n");
-#if defined(CONFIG_SPL_PAYLOAD_ARGS_ADDR)
- spl_fixup_fdt((void *)CONFIG_SPL_PAYLOAD_ARGS_ADDR);
-#endif
+ if (IS_ENABLED(CONFIG_SPL_OS_BOOT))
+ spl_fixup_fdt((void *)SPL_PAYLOAD_ARGS_ADDR);
spl_board_prepare_for_linux();
jump_to_image_linux(&spl_image);
#endif