[U-Boot] [PATCH v2] at91: Don't initialize watchdog if CONFIG_SKIP_WATCHDOG_INIT is undefined

Alexander Stein alexander.stein at systec-electronic.com
Mon Jul 26 11:34:34 CEST 2010


This allows Linux to initialize and use the watchdog with the included
driver.

Signed-off-by: Alexander Stein <alexander.stein at systec-electronic.com>
---
Changes in v2:
* Add a new specific option CONFIG_SKIP_WATCHDOG_INIT
* Add some documentation

 README                                      |    5 +++++
 arch/arm/cpu/arm926ejs/at91/lowlevel_init.S |    2 ++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/README b/README
index a9c98f2..502054d 100644
--- a/README
+++ b/README
@@ -2817,6 +2817,11 @@ Low Level (hardware related) configuration options:
 		some other boot loader or by a debugger which
 		performs these initializations itself.
 
+- CONFIG_SKIP_WATCHDOG_INIT
+
+		[arm AT91 only] If this variable is defined, then the
+		watchdog will not be programmed upon u-boot start.
+
 - CONFIG_PRELOADER
 
 		Modifies the behaviour of start.S when compiling a loader
diff --git a/arch/arm/cpu/arm926ejs/at91/lowlevel_init.S b/arch/arm/cpu/arm926ejs/at91/lowlevel_init.S
index 559c35c..0645ba8 100644
--- a/arch/arm/cpu/arm926ejs/at91/lowlevel_init.S
+++ b/arch/arm/cpu/arm926ejs/at91/lowlevel_init.S
@@ -186,8 +186,10 @@ SDRAM_setup_end:
 	.ltorg
 
 SMRDATA:
+#ifndef CONFIG_SKIP_WATCHDOG_INIT
 	.word AT91_ASM_WDT_MR
 	.word CONFIG_SYS_WDTC_WDMR_VAL
+#endif
 	/* configure PIOx as EBI0 D[16-31] */
 #if defined(CONFIG_AT91SAM9263)
 	.word AT91_ASM_PIOD_PDR
-- 
1.7.1



More information about the U-Boot mailing list