All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Lange <thomas@corelatus.se>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ARM DaVinci: Reset with watchdog enabled
Date: Sun, 03 May 2009 20:07:33 +0200	[thread overview]
Message-ID: <49FDDD65.9010607@corelatus.se> (raw)

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

             reply	other threads:[~2009-05-03 18:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-03 18:07 Thomas Lange [this message]
2009-05-15 21:01 ` [U-Boot] [PATCH] ARM DaVinci: Reset with watchdog enabled Jean-Christophe PLAGNIOL-VILLARD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49FDDD65.9010607@corelatus.se \
    --to=thomas@corelatus.se \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.