Skip to content

Commit 63f14f3

Browse files
committedApr 2, 2015
libbase: implement flush_l2_cache for or1k
1 parent 382ed01 commit 63f14f3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

Diff for: ‎software/libbase/system.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,12 @@ void flush_l2_cache(void)
7878
l2_nwords = 1 << wishbone2lasmi_cachesize_read();
7979
for(i=0;i<2*l2_nwords;i++) {
8080
addr = MAIN_RAM_BASE + i*4;
81-
#ifdef __lm32__
81+
#if defined (__lm32__)
8282
__asm__ volatile("lw %0, (%1+0)\n":"=r"(dummy):"r"(addr));
83+
#elif defined (__or1k__)
84+
__asm__ volatile("l.lwz %0, 0(%1)\n":"=r"(dummy):"r"(addr));
8385
#else
84-
#warning TODO
86+
#error Unsupported architecture
8587
#endif
8688
}
8789
}

0 commit comments

Comments
 (0)
Please sign in to comment.