From: Wolfgang Denk Date: Tue, 22 Apr 2008 16:24:53 +0200 Subject: [U-Boot-Users] [PATCH] Added watchdog triggering calls in the "mtest" test function. In-Reply-To: <1208874293-2123-11-git-send-email-wd@denx.de> References: <1208874293-2123-1-git-send-email-wd@denx.de> <1208874293-2123-2-git-send-email-wd@denx.de> <1208874293-2123-3-git-send-email-wd@denx.de> <1208874293-2123-4-git-send-email-wd@denx.de> <1208874293-2123-5-git-send-email-wd@denx.de> <1208874293-2123-6-git-send-email-wd@denx.de> <1208874293-2123-7-git-send-email-wd@denx.de> <1208874293-2123-8-git-send-email-wd@denx.de> <1208874293-2123-9-git-send-email-wd@denx.de> <1208874293-2123-10-git-send-email-wd@denx.de> <1208874293-2123-11-git-send-email-wd@denx.de> Message-ID: <1208874293-2123-12-git-send-email-wd@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Sergei Poselenov Signed-off-by: Sergei Poselenov --- 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 #endif +#include #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