From: Alif Zakuan Yuslaimi Date: Mon, 4 Aug 2025 01:24:34 +0000 (-0700) Subject: drivers: watchdog: Enable watchdog support in SPL for Agilex X-Git-Tag: v2025.10-rc2~3^2~27 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a4453ab064a40a0cf0fcc8145d7eeab2ef0cb6f;p=pandora-u-boot.git drivers: watchdog: Enable watchdog support in SPL for Agilex Enable watchdog as early as possible after clock initialization which is set at 10 seconds. Signed-off-by: Alif Zakuan Yuslaimi Reviewed-by: Tien Fong Chee --- diff --git a/arch/arm/mach-socfpga/spl_agilex.c b/arch/arm/mach-socfpga/spl_agilex.c index 2780e0f921f..c16519fc2bd 100644 --- a/arch/arm/mach-socfpga/spl_agilex.c +++ b/arch/arm/mach-socfpga/spl_agilex.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include DECLARE_GLOBAL_DATA_PTR; @@ -84,6 +84,14 @@ void board_init_f(ulong dummy) hang(); } + /* + * Enable watchdog as early as possible before initializing other + * component. Watchdog need to be enabled after clock driver because + * it will retrieve the clock frequency from clock driver. + */ + if (CONFIG_IS_ENABLED(WDT)) + initr_watchdog(); + preloader_console_init(); print_reset_info(); cm_print_clock_quick_summary(); diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 56290b32bd9..9e149a75e81 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -31,7 +31,7 @@ config WATCHDOG_TIMEOUT_MSECS default 128000 if ARCH_MX5 || ARCH_MX6 default 128000 if ARCH_MX7 || ARCH_VF610 default 30000 if ARCH_SNAPDRAGON - default 30000 if ARCH_SOCFPGA + default 10000 if ARCH_SOCFPGA default 16000 if ARCH_SUNXI default 5376 if ULP_WATCHDOG default 15000 if ARCH_BCM283X