aboutsummaryrefslogtreecommitdiff
path: root/cmd/mem.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-09-18 08:34:31 -0400
committerTom Rini <trini@konsulko.com>2022-09-18 08:34:31 -0400
commitb6c50e5831f6ce3800d4b3cf3c7aa35dde8c48d9 (patch)
tree4403d1b2ff259014c01855e08191ad0d1c294741 /cmd/mem.c
parentd219fc06b30d4b1ac4fac6c40b2ca69cb5ecf642 (diff)
parent8695fbb3a7ff3640eff62f7123323b16546d5b35 (diff)
Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-watchdog into next
- Migrate watchdog reset to cyclic infrastructure (Stefan)
Diffstat (limited to 'cmd/mem.c')
-rw-r--r--cmd/mem.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/cmd/mem.c b/cmd/mem.c
index 6a7b4014ed..1e39348195 100644
--- a/cmd/mem.c
+++ b/cmd/mem.c
@@ -300,7 +300,7 @@ static int do_mem_cmp(struct cmd_tbl *cmdtp, int flag, int argc,
/* reset watchdog from time to time */
if ((ngood % (64 << 10)) == 0)
- WATCHDOG_RESET();
+ schedule();
}
unmap_sysmem(buf1);
unmap_sysmem(buf2);
@@ -848,7 +848,7 @@ static ulong mem_test_alt(vu_long *buf, ulong start_addr, ulong end_addr,
}
}
addr[test_offset] = pattern;
- WATCHDOG_RESET();
+ schedule();
/*
* Check for addr bits stuck low or shorted.
@@ -890,7 +890,7 @@ static ulong mem_test_alt(vu_long *buf, ulong start_addr, ulong end_addr,
* Fill memory with a known pattern.
*/
for (pattern = 1, offset = 0; offset < num_words; pattern++, offset++) {
- WATCHDOG_RESET();
+ schedule();
addr[offset] = pattern;
}
@@ -898,7 +898,7 @@ static ulong mem_test_alt(vu_long *buf, ulong start_addr, ulong end_addr,
* Check each location and invert it for the second pass.
*/
for (pattern = 1, offset = 0; offset < num_words; pattern++, offset++) {
- WATCHDOG_RESET();
+ schedule();
temp = addr[offset];
if (temp != pattern) {
printf("\nFAILURE (read/write) @ 0x%.8lx:"
@@ -918,7 +918,7 @@ static ulong mem_test_alt(vu_long *buf, ulong start_addr, ulong end_addr,
* Check each location for the inverted pattern and zero it.
*/
for (pattern = 1, offset = 0; offset < num_words; pattern++, offset++) {
- WATCHDOG_RESET();
+ schedule();
anti_pattern = ~pattern;
temp = addr[offset];
if (temp != anti_pattern) {
@@ -972,7 +972,7 @@ static ulong test_bitflip_comparison(volatile unsigned long *bufa,
for (k = 0; k < max; k++) {
q = 0x00000001L << k;
for (j = 0; j < 8; j++) {
- WATCHDOG_RESET();
+ schedule();
q = ~q;
p1 = (volatile unsigned long *)bufa;
p2 = (volatile unsigned long *)bufb;
@@ -1033,7 +1033,7 @@ static ulong mem_test_quick(vu_long *buf, ulong start_addr, ulong end_addr,
pattern, "");
for (addr = buf, val = pattern; addr < end; addr++) {
- WATCHDOG_RESET();
+ schedule();
*addr = val;
val += incr;
}
@@ -1041,7 +1041,7 @@ static ulong mem_test_quick(vu_long *buf, ulong start_addr, ulong end_addr,
puts("Reading...");
for (addr = buf, val = pattern; addr < end; addr++) {
- WATCHDOG_RESET();
+ schedule();
readback = *addr;
if (readback != val) {
ulong offset = addr - buf;