]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: x530: switch to wdt_stop_all()
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Thu, 19 Aug 2021 09:57:02 +0000 (11:57 +0200)
committerStefan Roese <sr@denx.de>
Tue, 31 Aug 2021 10:04:03 +0000 (12:04 +0200)
Since the gd->watchdog_dev member is going away, switch to using the
new wdt_stop_all() helper.

While here, clean up the preprocessor conditional: The ->watchdog_dev
member is actually guarded by CONFIG_WDT [disabling that in
x530_defconfig while keeping CONFIG_WATCHDOG breaks the build], and in
the new world order so is the existence of the wdt_stop_all()
function.

Actually, existence of wdt_stop_all() depends on CONFIG_${SPL_}WDT, so
really spell the condition using CONFIG_IS_ENABLED, and make it a C
rather than cpp if.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
board/alliedtelesis/x530/x530.c

index 7bcfa828d7ca891e6e672998b991f5f3b06a87df..8b31045a0743c83bb7b0e717d253bb83952ca410 100644 (file)
@@ -121,9 +121,8 @@ int board_init(void)
 
 void arch_preboot_os(void)
 {
-#ifdef CONFIG_WATCHDOG
-       wdt_stop(gd->watchdog_dev);
-#endif
+       if (CONFIG_IS_ENABLED(WDT))
+               wdt_stop_all();
 }
 
 static int led_7seg_init(unsigned int segments)