cmd: memtester: add test mask for test stuck address

Change-Id: Icbcf7e460befcc098c45e4e3efb7fb3c1bcb73a0
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
This commit is contained in:
Tang Yun ping 2019-01-11 10:23:26 +08:00 committed by Kever Yang
parent 660ca12ed9
commit c337a3c2b1
1 changed files with 8 additions and 5 deletions

View File

@ -98,11 +98,13 @@ int doing_memtester(ul *arg, ul testenable, ul loops, ul err_exit)
if (loops)
printf("/%lu", loops);
printf(":\n");
printf(" %-20s: ", "Stuck Address");
if (!test_stuck_address(bufa[j], count[j] * 2))
printf("ok\n");
else
exit_code |= EXIT_FAIL_ADDRESSLINES;
if (testenable && ((1 << 17) & testenable)) {
printf(" %-20s: ", "Stuck Address");
if (!test_stuck_address(bufa[j], count[j] * 2))
printf("ok\n");
else
exit_code |= EXIT_FAIL_ADDRESSLINES;
}
for (i = 0;; i++) {
if (!tests[i].name)
break;
@ -215,6 +217,7 @@ U_BOOT_CMD(memtester, 6, 1, do_memtester,
" bit14: Walking Zeroes\n"
" bit15: 8-bit Writes\n"
" bit16: 16-bit Writes\n"
" bit17: test stuck address\n"
" example: testenable=0x1000,enable Bit Flip only\n"
"err_exit: if 1 stop testing immediately when finding error\n"
"loop[option]: testing loop, if 0 or null endless loop\n"