From 106e4c6962685607a91b3e30d0597698ec3ead36 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Thu, 30 Jul 2015 23:55:31 +0200 Subject: [PATCH] bios/sdram: fix error_cnt computation in memtest --- software/bios/sdram.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/software/bios/sdram.c b/software/bios/sdram.c index 08f0162c..bb917df6 100644 --- a/software/bios/sdram.c +++ b/software/bios/sdram.c @@ -456,11 +456,12 @@ int memtest_silent(void) unsigned short seed_16; unsigned int error_cnt; + error_cnt = 0; + /* test data bus */ for(i=0;i<128;i++) { array[i] = ONEZERO; } - error_cnt = 0; flush_cpu_dcache(); flush_l2_cache(); for(i=0;i<128;i++) { @@ -471,7 +472,6 @@ int memtest_silent(void) for(i=0;i<128;i++) { array[i] = ZEROONE; } - error_cnt = 0; flush_cpu_dcache(); flush_l2_cache(); for(i=0;i<128;i++) { @@ -487,7 +487,6 @@ int memtest_silent(void) } seed_32 = 0; - error_cnt = 0; flush_cpu_dcache(); flush_l2_cache(); for(i=0;i