bios/sdram: fix error_cnt computation in memtest
This commit is contained in:
parent
94cb3cbcf6
commit
106e4c6962
|
@ -456,11 +456,12 @@ int memtest_silent(void)
|
||||||
unsigned short seed_16;
|
unsigned short seed_16;
|
||||||
unsigned int error_cnt;
|
unsigned int error_cnt;
|
||||||
|
|
||||||
|
error_cnt = 0;
|
||||||
|
|
||||||
/* test data bus */
|
/* test data bus */
|
||||||
for(i=0;i<128;i++) {
|
for(i=0;i<128;i++) {
|
||||||
array[i] = ONEZERO;
|
array[i] = ONEZERO;
|
||||||
}
|
}
|
||||||
error_cnt = 0;
|
|
||||||
flush_cpu_dcache();
|
flush_cpu_dcache();
|
||||||
flush_l2_cache();
|
flush_l2_cache();
|
||||||
for(i=0;i<128;i++) {
|
for(i=0;i<128;i++) {
|
||||||
|
@ -471,7 +472,6 @@ int memtest_silent(void)
|
||||||
for(i=0;i<128;i++) {
|
for(i=0;i<128;i++) {
|
||||||
array[i] = ZEROONE;
|
array[i] = ZEROONE;
|
||||||
}
|
}
|
||||||
error_cnt = 0;
|
|
||||||
flush_cpu_dcache();
|
flush_cpu_dcache();
|
||||||
flush_l2_cache();
|
flush_l2_cache();
|
||||||
for(i=0;i<128;i++) {
|
for(i=0;i<128;i++) {
|
||||||
|
@ -487,7 +487,6 @@ int memtest_silent(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
seed_32 = 0;
|
seed_32 = 0;
|
||||||
error_cnt = 0;
|
|
||||||
flush_cpu_dcache();
|
flush_cpu_dcache();
|
||||||
flush_l2_cache();
|
flush_l2_cache();
|
||||||
for(i=0;i<TEST_DATA_SIZE/4;i++) {
|
for(i=0;i<TEST_DATA_SIZE/4;i++) {
|
||||||
|
@ -504,7 +503,6 @@ int memtest_silent(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
seed_16 = 0;
|
seed_16 = 0;
|
||||||
error_cnt = 0;
|
|
||||||
flush_cpu_dcache();
|
flush_cpu_dcache();
|
||||||
flush_l2_cache();
|
flush_l2_cache();
|
||||||
for(i=0;i<TEST_ADDR_SIZE/4;i++) {
|
for(i=0;i<TEST_ADDR_SIZE/4;i++) {
|
||||||
|
@ -522,7 +520,7 @@ int memtest(void)
|
||||||
|
|
||||||
e = memtest_silent();
|
e = memtest_silent();
|
||||||
if(e != 0) {
|
if(e != 0) {
|
||||||
printf("Memtest failed: %d/%d words incorrect\n", e, TEST_DATA_SIZE/4 + TEST_ADDR_SIZE/4);
|
printf("Memtest failed: %d/%d words incorrect\n", e, 2*128 + TEST_DATA_SIZE/4 + TEST_ADDR_SIZE/4);
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
printf("Memtest OK\n");
|
printf("Memtest OK\n");
|
||||||
|
|
Loading…
Reference in New Issue