public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] ARM DaVinci: Reset with watchdog enabled
@ 2009-05-03 18:07 Thomas Lange
  2009-05-15 21:01 ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Lange @ 2009-05-03 18:07 UTC (permalink / raw)
  To: u-boot

Once the Davinci watchdog has been enabled, the timeout
value cannot be changed. If the timeout in use is long,
it can take a long time for card to reset. By writing
an invalid service key, we can trigger an immediate reset.

Signed-off-by: Thomas Lange <thomas@corelatus.se>
---
 cpu/arm926ejs/davinci/reset.S |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/cpu/arm926ejs/davinci/reset.S b/cpu/arm926ejs/davinci/reset.S
index a687d44..ba0a7c3 100644
--- a/cpu/arm926ejs/davinci/reset.S
+++ b/cpu/arm926ejs/davinci/reset.S
@@ -50,6 +50,10 @@ reset_cpu:
 	str	r1, [r0]
 	ldr	r1, WDTCR_VAL2
 	str	r1, [r0]
+	/* Write an invalid value to the WDKEY field to trigger
+	 * an immediate watchdog reset */
+	mov     r1, $0x4000
+	str     r1, [r0]
 	nop
 	nop
 	nop
-- 
1.5.6.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-05-15 21:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-03 18:07 [U-Boot] [PATCH] ARM DaVinci: Reset with watchdog enabled Thomas Lange
2009-05-15 21:01 ` Jean-Christophe PLAGNIOL-VILLARD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox