[U-Boot] [PATCH] arm: add initilisation of watchdog in init_sequence

Nicolas Ferre nicolas.ferre at atmel.com
Wed May 26 13:07:40 CEST 2010


For platforms that implement a hardware watchdog, call its initialization
routine in init_sequence.
This location has been chosen to be the closest to initialization of console as
some watchdog drivers are writing status messages. On the other hand, watchdog
setup should be close to chip startup to be able to begin the triggering
quickly.

Signed-off-by: Nicolas Ferre <nicolas.ferre at atmel.com>
---
 arch/arm/lib/board.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index f5660a9..569009e 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -70,6 +70,10 @@ extern int  AT91F_DataflashInit(void);
 extern void dataflash_print_info(void);
 #endif
 
+#ifdef CONFIG_HW_WATCHDOG
+extern void hw_watchdog_init(void);
+#endif
+
 #ifndef CONFIG_IDENT_STRING
 #define CONFIG_IDENT_STRING ""
 #endif
@@ -251,6 +255,9 @@ init_fnc_t *init_sequence[] = {
 	serial_init,		/* serial communications setup */
 	console_init_f,		/* stage 1 init of console */
 	display_banner,		/* say that we are here */
+#if defined(CONFIG_HW_WATCHDOG)
+	hw_watchdog_init,	/* watchdog setup */
+#endif
 #if defined(CONFIG_DISPLAY_CPUINFO)
 	print_cpuinfo,		/* display cpu info (and speed) */
 #endif
-- 
1.5.6.5



More information about the U-Boot mailing list