]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
spl: Drop #ifdefs for BOARD_INIT and watchdog
authorSimon Glass <sjg@chromium.org>
Tue, 26 Sep 2023 14:14:20 +0000 (08:14 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 6 Oct 2023 18:38:12 +0000 (14:38 -0400)
Avoid using the preprocessor for these checks.

Signed-off-by: Simon Glass <sjg@chromium.org>
common/spl/spl.c
include/spl.h

index d930d2083de0cc3dbe9d734096acf689eadd2a94..530ade556eea7b4a31c2e03090ae69baa27b2d53 100644 (file)
@@ -778,13 +778,11 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
                }
        }
 
-#if CONFIG_IS_ENABLED(BOARD_INIT)
-       spl_board_init();
-#endif
+       if (CONFIG_IS_ENABLED(BOARD_INIT))
+               spl_board_init();
 
-#if defined(CONFIG_SPL_WATCHDOG) && CONFIG_IS_ENABLED(WDT)
-       initr_watchdog();
-#endif
+       if (IS_ENABLED(CONFIG_SPL_WATCHDOG) && CONFIG_IS_ENABLED(WDT))
+               initr_watchdog();
 
        if (IS_ENABLED(CONFIG_SPL_OS_BOOT) || CONFIG_IS_ENABLED(HANDOFF) ||
            IS_ENABLED(CONFIG_SPL_ATF))
index 0fedddd00ef412d322ccfc63b7cd0492834bc210..ab06e32ebd9611a4d7c49a2cfb1d4809622e5d5a 100644 (file)
@@ -707,9 +707,13 @@ int spl_early_init(void);
  */
 int spl_init(void);
 
-#ifdef CONFIG_SPL_BOARD_INIT
+/*
+ * spl_board_init() - Do board-specific init in SPL
+ *
+ * If xPL_BOARD_INIT is enabled, this is called from board_init_r() before
+ * jumping to the next phase.
+ */
 void spl_board_init(void);
-#endif
 
 /**
  * spl_was_boot_source() - check if U-Boot booted from SPL