software/libbase/system: fix flush_l2_cache
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Fri, 19 Jun 2015 07:00:14 +0000 (09:00 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Fri, 19 Jun 2015 07:00:14 +0000 (09:00 +0200)
software/libbase/system.c

index 3f19c23d4cb9872269ae7d23a8ba6ab98fe490fa..c97365393c51510ba52ad9b19d18b499043ae281 100644 (file)
@@ -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));