summaryrefslogtreecommitdiff
path: root/arch/arm/mach-socfpga/spl_agilex.c
diff options
context:
space:
mode:
authorAlif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>2025-08-03 18:24:34 -0700
committerTien Fong Chee <tien.fong.chee@intel.com>2025-08-08 22:20:46 +0800
commit6a4453ab064a40a0cf0fcc8145d7eeab2ef0cb6f (patch)
tree755ae71a1eba4fa9eecaf46790303798cafdf06f /arch/arm/mach-socfpga/spl_agilex.c
parent3721998510de23ff77e0f9cbb61c8c5f8c38ddd2 (diff)
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 <alif.zakuan.yuslaimi@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
Diffstat (limited to 'arch/arm/mach-socfpga/spl_agilex.c')
-rw-r--r--arch/arm/mach-socfpga/spl_agilex.c10
1 files changed, 9 insertions, 1 deletions
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 <asm/arch/misc.h>
#include <asm/arch/reset_manager.h>
#include <asm/arch/system_manager.h>
-#include <watchdog.h>
+#include <wdt.h>
#include <dm/uclass.h>
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();