summaryrefslogtreecommitdiff
path: root/include/asm-sh/cache.h
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2008-09-22 15:26:49 +0200
committerStefan Roese <sr@denx.de>2008-09-22 15:26:49 +0200
commit5289feadb7857e2eaf81848aa632afa4a07bc0cc (patch)
treee35f1a35b711e5b2e6a881cfc01feae63b74f0ad /include/asm-sh/cache.h
parent023824549a370bd185d7129d9a6c86f9be7b86a8 (diff)
parent3a9a000d9fba5a127786c8a859d654ba3721917b (diff)
Merge branch 'master' of /home/stefan/git/u-boot/u-boot
Diffstat (limited to 'include/asm-sh/cache.h')
-rw-r--r--include/asm-sh/cache.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/asm-sh/cache.h b/include/asm-sh/cache.h
index 25b409b6b0..2cfc0a7944 100644
--- a/include/asm-sh/cache.h
+++ b/include/asm-sh/cache.h
@@ -3,29 +3,31 @@
#if defined(CONFIG_SH4) || defined(CONFIG_SH4A)
+int cache_control(unsigned int cmd);
+
#define L1_CACHE_BYTES 32
struct __large_struct { unsigned long buf[100]; };
#define __m(x) (*(struct __large_struct *)(x))
-void dcache_wback_range (u32 start, u32 end)
+void dcache_wback_range(u32 start, u32 end)
{
u32 v;
start &= ~(L1_CACHE_BYTES - 1);
for (v = start; v < end; v += L1_CACHE_BYTES) {
- asm volatile ("ocbwb %0": /* no output */
- :"m" (__m (v)));
+ asm volatile ("ocbwb %0" : /* no output */
+ : "m" (__m(v)));
}
}
-void dcache_invalid_range (u32 start, u32 end)
+void dcache_invalid_range(u32 start, u32 end)
{
u32 v;
start &= ~(L1_CACHE_BYTES - 1);
for (v = start; v < end; v += L1_CACHE_BYTES) {
- asm volatile ("ocbi %0": /* no output */
- :"m" (__m (v)));
+ asm volatile ("ocbi %0" : /* no output */
+ : "m" (__m(v)));
}
}
#endif /* CONFIG_SH4 || CONFIG_SH4A */