public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] Added watchdog triggering calls in the "mtest" test function.
Date: Tue, 22 Apr 2008 16:24:53 +0200	[thread overview]
Message-ID: <1208874293-2123-12-git-send-email-wd@denx.de> (raw)
In-Reply-To: <1208874293-2123-11-git-send-email-wd@denx.de>

From: Sergei Poselenov <sposelenov@emcraft.com>

Signed-off-by: Sergei Poselenov <sposelenov@emcraft.com>
---
 common/cmd_mem.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/common/cmd_mem.c b/common/cmd_mem.c
index 4262e26..4740664 100644
--- a/common/cmd_mem.c
+++ b/common/cmd_mem.c
@@ -35,6 +35,7 @@
 #ifdef CONFIG_HAS_DATAFLASH
 #include <dataflash.h>
 #endif
+#include <watchdog.h>
 
 #if defined(CONFIG_CMD_MEMORY)		\
     || defined(CONFIG_CMD_I2C)		\
@@ -868,6 +869,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 		    }
 		}
 		start[test_offset] = pattern;
+		WATCHDOG_RESET();
 
 		/*
 		 * Check for addr bits stuck low or shorted.
@@ -905,6 +907,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 		 * Fill memory with a known pattern.
 		 */
 		for (pattern = 1, offset = 0; offset < num_words; pattern++, offset++) {
+			WATCHDOG_RESET();
 			start[offset] = pattern;
 		}
 
@@ -912,6 +915,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 		 * Check each location and invert it for the second pass.
 		 */
 		for (pattern = 1, offset = 0; offset < num_words; pattern++, offset++) {
+		    WATCHDOG_RESET();
 		    temp = start[offset];
 		    if (temp != pattern) {
 			printf ("\nFAILURE (read/write) @ 0x%.8lx:"
@@ -928,6 +932,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 		 * Check each location for the inverted pattern and zero it.
 		 */
 		for (pattern = 1, offset = 0; offset < num_words; pattern++, offset++) {
+		    WATCHDOG_RESET();
 		    anti_pattern = ~pattern;
 		    temp = start[offset];
 		    if (temp != anti_pattern) {
@@ -954,6 +959,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 			pattern, "");
 
 		for (addr=start,val=pattern; addr<end; addr++) {
+			WATCHDOG_RESET();
 			*addr = val;
 			val  += incr;
 		}
@@ -961,6 +967,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 		puts ("Reading...");
 
 		for (addr=start,val=pattern; addr<end; addr++) {
+			WATCHDOG_RESET();
 			readback = *addr;
 			if (readback != val) {
 				printf ("\nMem error @ 0x%08X: "
-- 
1.5.4.2

  reply	other threads:[~2008-04-22 14:24 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-22 14:24 [U-Boot-Users] [PATCH] Enable CODEC POST with CFG_POST_CODEC rather than with CFG_POST_DSP Wolfgang Denk
2008-04-22 14:24 ` [U-Boot-Users] [PATCH] The patch adds new POST tests for the Lwmon5 board Wolfgang Denk
2008-04-22 14:24   ` [U-Boot-Users] [PATCH] The patch introduces the CRITICAL feature of POST tests. If the test Wolfgang Denk
2008-04-22 14:24     ` [U-Boot-Users] [PATCH] Some fixes to dspic, fpga, and gdc post tests for lwmon5 Wolfgang Denk
2008-04-22 14:24       ` [U-Boot-Users] [PATCH] Add support for the lwmon5 board reset via GPIO58 Wolfgang Denk
2008-04-22 14:24         ` [U-Boot-Users] [PATCH] The patch introduces the alternative configuration of the log buffer for Wolfgang Denk
2008-04-22 14:24           ` [U-Boot-Users] [PATCH] Fix backlight in the lwmon5 POST Wolfgang Denk
2008-04-22 14:24             ` [U-Boot-Users] [PATCH] lwmon5: Fix register test logic to match the specific GDC h/w Wolfgang Denk
2008-04-22 14:24               ` [U-Boot-Users] [PATCH] POST: preparations for moving CONFIG_POST to Makefiles Wolfgang Denk
2008-04-22 14:24                 ` [U-Boot-Users] [PATCH] POST: move " Wolfgang Denk
2008-04-22 14:24                   ` [U-Boot-Users] [PATCH] lwmon5 watchdog: limit trigger rate Wolfgang Denk
2008-04-22 14:24                     ` Wolfgang Denk [this message]
2008-04-24 14:43                     ` Stefan Roese
2008-04-24 14:50               ` [U-Boot-Users] [PATCH] lwmon5: Fix register test logic to match the specific GDC h/w Stefan Roese
2008-04-24 14:36             ` [U-Boot-Users] [PATCH] Fix backlight in the lwmon5 POST Stefan Roese
2008-04-24 14:35         ` [U-Boot-Users] [PATCH] Add support for the lwmon5 board reset via GPIO58 Stefan Roese
2008-04-24 14:34       ` [U-Boot-Users] [PATCH] Some fixes to dspic, fpga, and gdc post tests for lwmon5 Stefan Roese
2008-04-24 14:33   ` [U-Boot-Users] [PATCH] The patch adds new POST tests for the Lwmon5 board Stefan Roese

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=1208874293-2123-12-git-send-email-wd@denx.de \
    --to=wd@denx.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox