From: Florent Kermarrec Date: Thu, 30 Jul 2015 21:55:31 +0000 (+0200) Subject: bios/sdram: fix error_cnt computation in memtest X-Git-Tag: 24jan2021_ls180~2170 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=106e4c6962685607a91b3e30d0597698ec3ead36;p=litex.git bios/sdram: fix error_cnt computation in memtest --- 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