summaryrefslogtreecommitdiff
path: root/common/cmd_mem.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2008-04-25 11:32:01 +0200
committerWolfgang Denk <wd@denx.de>2008-04-25 11:32:01 +0200
commit4b7a6dd89633d60dc4b58476d5ce48247f82a3ca (patch)
treed3cfeccec77867d855289809d6a472617d16c0cc /common/cmd_mem.c
parent926662762e5d280f6a9caed8dd9f49be2ebcaf2f (diff)
parenta6e6fc610e39dec41b79680413d4ed38145bd3c8 (diff)
Merge branch 'master' of /home/wd/git/u-boot/lwmon5
Conflicts: common/cmd_bootm.c common/cmd_log.c include/common.h post/board/lwmon5/Makefile post/board/lwmon5/dsp.c post/board/lwmon5/dspic.c post/board/lwmon5/fpga.c post/board/lwmon5/gdc.c post/board/lwmon5/sysmon.c post/board/lwmon5/watchdog.c Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'common/cmd_mem.c')
-rw-r--r--common/cmd_mem.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/common/cmd_mem.c b/common/cmd_mem.c
index d6d7a5b77f9..51aa71fca84 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) \
@@ -872,6 +873,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.
@@ -909,6 +911,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;
}
@@ -916,6 +919,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:"
@@ -932,6 +936,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) {
@@ -958,6 +963,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;
}
@@ -965,6 +971,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: "