]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: sl28: fix linking with disabled watchdog
authorMichael Walle <mwalle@kernel.org>
Fri, 13 Dec 2024 10:23:17 +0000 (11:23 +0100)
committerPeng Fan <peng.fan@nxp.com>
Sun, 15 Dec 2024 01:00:31 +0000 (09:00 +0800)
We don't have a reference to the driver used by
uclass_get_device_by_driver() in stop_recovery_watchdog(). Fix it by not
calling that function if the watchdog driver isn't enabled.

Signed-off-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
board/kontron/sl28/sl28.c

index adfec8ba2379cb65563569230079b8b58104efb4..0baf5c63f189ec7ae8c409a943457793169dddeb 100644 (file)
@@ -156,7 +156,8 @@ int fsl_board_late_init(void)
         * If the watchdog isn't enabled at reset (which is a configuration
         * option) disabling it doesn't hurt either.
         */
-       if (!IS_ENABLED(CONFIG_WATCHDOG_AUTOSTART))
+       if (IS_ENABLED(CONFIG_WDT_SL28CPLD) &&
+           !IS_ENABLED(CONFIG_WATCHDOG_AUTOSTART))
                stop_recovery_watchdog();
 
        return 0;