From: Florent Kermarrec Date: Fri, 19 Jun 2015 07:00:14 +0000 (+0200) Subject: software/libbase/system: fix flush_l2_cache X-Git-Tag: 24jan2021_ls180~2229 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=781869d6f92ab4cfca1bac1ba2ddba0cf0207096;p=litex.git software/libbase/system: fix flush_l2_cache --- diff --git a/software/libbase/system.c b/software/libbase/system.c index 3f19c23d..c9736539 100644 --- a/software/libbase/system.c +++ b/software/libbase/system.c @@ -74,7 +74,7 @@ void flush_l2_cache(void) register unsigned int addr; register unsigned int dummy; - for(i=0;i<2*L2_SIZE;i++) { + for(i=0;i<2*L2_SIZE/4;i++) { addr = MAIN_RAM_BASE + i*4; #if defined (__lm32__) __asm__ volatile("lw %0, (%1+0)\n":"=r"(dummy):"r"(addr));