[PATCH v1 9/9] spl: s10: Enhance watchdog support in SPL for Stratix 10
Chee, Tien Fong
tien.fong.chee at altera.com
Tue Apr 21 11:17:47 CEST 2026
Hi Alif,
On 3/4/2026 10:25 am, alif.zakuan.yuslaimi at altera.com wrote:
> From: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi at altera.com>
>
> Watchdog needs to be fully executed in the onchip ram. Enabling watchdog
> before initializing other components such as DDR in Stratix10 SPL
>
> Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi at altera.com>
> ---
> arch/arm/mach-socfpga/spl_s10.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/arch/arm/mach-socfpga/spl_s10.c b/arch/arm/mach-socfpga/spl_s10.c
> index ace029557f3..588dca4fcd3 100644
> --- a/arch/arm/mach-socfpga/spl_s10.c
> +++ b/arch/arm/mach-socfpga/spl_s10.c
> @@ -18,7 +18,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>
>
> u32 reset_flag(void)
> @@ -54,13 +54,6 @@ void board_init_f(ulong dummy)
> writel(SYSMGR_WDDBG_PAUSE_ALL_CPU,
> socfpga_get_sysmgr_addr() + SYSMGR_SOC64_WDDBG);
>
> -#ifdef CONFIG_HW_WATCHDOG
> - /* Enable watchdog before initializing the HW */
> - socfpga_per_reset(SOCFPGA_RESET(L4WD0), 1);
> - socfpga_per_reset(SOCFPGA_RESET(L4WD0), 0);
> - hw_watchdog_init();
> -#endif
> -
> /* ensure all processors are not released prior Linux boot */
> writeq(0, CPU_RELEASE_ADDR);
>
> @@ -80,6 +73,13 @@ void board_init_f(ulong dummy)
> hang();
> }
>
> + /*
> + * Enable watchdog as early as possible before initializing other
> + * component.
> + */
> + if (CONFIG_IS_ENABLED(WDT))
> + initr_watchdog();
Either move initr_watchdog() before the ALTERA_SDRAM block to match the
stated intent ("before DDR"),
or update the commit message to accurately describe where it is placed
and why.
Best regards,
Tien Fong
More information about the U-Boot
mailing list