projects
/
litex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
382ed01
)
libbase: implement flush_l2_cache for or1k
author
Sebastien Bourdeauducq
<sb@m-labs.hk>
Thu, 2 Apr 2015 08:47:03 +0000
(16:47 +0800)
committer
Sebastien Bourdeauducq
<sb@m-labs.hk>
Thu, 2 Apr 2015 08:47:03 +0000
(16:47 +0800)
software/libbase/system.c
patch
|
blob
|
history
diff --git
a/software/libbase/system.c
b/software/libbase/system.c
index f0ea28fae914b163cd7fd754d2a88e55acb36227..607d122da1a934d3fa1933b5fd76d2f8d4a6c729 100644
(file)
--- a/
software/libbase/system.c
+++ b/
software/libbase/system.c
@@
-78,10
+78,12
@@
void flush_l2_cache(void)
l2_nwords = 1 << wishbone2lasmi_cachesize_read();
for(i=0;i<2*l2_nwords;i++) {
addr = MAIN_RAM_BASE + i*4;
-#if
def __lm32__
+#if
defined (__lm32__)
__asm__ volatile("lw %0, (%1+0)\n":"=r"(dummy):"r"(addr));
+#elif defined (__or1k__)
+ __asm__ volatile("l.lwz %0, 0(%1)\n":"=r"(dummy):"r"(addr));
#else
-#
warning TODO
+#
error Unsupported architecture
#endif
}
}