aboutsummaryrefslogtreecommitdiff
path: root/post/drivers/memory.c
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2022-09-02 14:10:46 +0200
committerStefan Roese <sr@denx.de>2022-09-18 10:26:33 +0200
commit29caf9305b6fafe8f6d6b18fa1f825dff8686e61 (patch)
tree6530f6a2373b7af6fb4fdceca823b21f7c79ed7f /post/drivers/memory.c
parent881d4108257a45ac890ef27c523783dbe401e462 (diff)
cyclic: Use schedule() instead of WATCHDOG_RESET()
Globally replace all occurances of WATCHDOG_RESET() with schedule(), which handles the HW_WATCHDOG functionality and the cyclic infrastructure. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Tom Rini <trini@konsulko.com> [am335x_evm, mx6cuboxi, rpi_3,dra7xx_evm, pine64_plus, am65x_evm, j721e_evm]
Diffstat (limited to 'post/drivers/memory.c')
-rw-r--r--post/drivers/memory.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/post/drivers/memory.c b/post/drivers/memory.c
index 4fb9355d60..d249942af0 100644
--- a/post/drivers/memory.c
+++ b/post/drivers/memory.c
@@ -279,7 +279,7 @@ static int memory_post_test1(unsigned long start,
for (i = 0; i < size / sizeof (ulong); i++) {
mem[i] = val;
if (i % 1024 == 0)
- WATCHDOG_RESET();
+ schedule();
}
for (i = 0; i < size / sizeof (ulong) && !ret; i++) {
@@ -292,7 +292,7 @@ static int memory_post_test1(unsigned long start,
break;
}
if (i % 1024 == 0)
- WATCHDOG_RESET();
+ schedule();
}
return ret;
@@ -308,7 +308,7 @@ static int memory_post_test2(unsigned long start, unsigned long size)
for (i = 0; i < size / sizeof (ulong); i++) {
mem[i] = 1 << (i % 32);
if (i % 1024 == 0)
- WATCHDOG_RESET();
+ schedule();
}
for (i = 0; i < size / sizeof (ulong) && !ret; i++) {
@@ -321,7 +321,7 @@ static int memory_post_test2(unsigned long start, unsigned long size)
break;
}
if (i % 1024 == 0)
- WATCHDOG_RESET();
+ schedule();
}
return ret;
@@ -337,7 +337,7 @@ static int memory_post_test3(unsigned long start, unsigned long size)
for (i = 0; i < size / sizeof (ulong); i++) {
mem[i] = i;
if (i % 1024 == 0)
- WATCHDOG_RESET();
+ schedule();
}
for (i = 0; i < size / sizeof (ulong) && !ret; i++) {
@@ -350,7 +350,7 @@ static int memory_post_test3(unsigned long start, unsigned long size)
break;
}
if (i % 1024 == 0)
- WATCHDOG_RESET();
+ schedule();
}
return ret;
@@ -366,7 +366,7 @@ static int memory_post_test4(unsigned long start, unsigned long size)
for (i = 0; i < size / sizeof (ulong); i++) {
mem[i] = ~i;
if (i % 1024 == 0)
- WATCHDOG_RESET();
+ schedule();
}
for (i = 0; i < size / sizeof (ulong) && !ret; i++) {
@@ -379,7 +379,7 @@ static int memory_post_test4(unsigned long start, unsigned long size)
break;
}
if (i % 1024 == 0)
- WATCHDOG_RESET();
+ schedule();
}
return ret;
@@ -390,15 +390,15 @@ static int memory_post_test_lines(unsigned long start, unsigned long size)
int ret = 0;
ret = memory_post_dataline((unsigned long long *)start);
- WATCHDOG_RESET();
+ schedule();
if (!ret)
ret = memory_post_addrline((ulong *)start, (ulong *)start,
size);
- WATCHDOG_RESET();
+ schedule();
if (!ret)
ret = memory_post_addrline((ulong *)(start+size-8),
(ulong *)start, size);
- WATCHDOG_RESET();
+ schedule();
return ret;
}
@@ -408,25 +408,25 @@ static int memory_post_test_patterns(unsigned long start, unsigned long size)
int ret = 0;
ret = memory_post_test1(start, size, 0x00000000);
- WATCHDOG_RESET();
+ schedule();
if (!ret)
ret = memory_post_test1(start, size, 0xffffffff);
- WATCHDOG_RESET();
+ schedule();
if (!ret)
ret = memory_post_test1(start, size, 0x55555555);
- WATCHDOG_RESET();
+ schedule();
if (!ret)
ret = memory_post_test1(start, size, 0xaaaaaaaa);
- WATCHDOG_RESET();
+ schedule();
if (!ret)
ret = memory_post_test2(start, size);
- WATCHDOG_RESET();
+ schedule();
if (!ret)
ret = memory_post_test3(start, size);
- WATCHDOG_RESET();
+ schedule();
if (!ret)
ret = memory_post_test4(start, size);
- WATCHDOG_RESET();
+ schedule();
return ret;
}