diff options
author | Markus Klotzbuecher <mk@denx.de> | 2008-10-21 09:18:01 +0200 |
---|---|---|
committer | Markus Klotzbuecher <mk@denx.de> | 2008-10-21 09:18:01 +0200 |
commit | 50bd0057ba8fceeb48533f8b1a652ccd0e170838 (patch) | |
tree | ea1a183343573c2a48248923b96d316c0956727c /include/asm-sh/cache.h | |
parent | 9dbc366744960013965fce8851035b6141f3b3ae (diff) | |
parent | f82642e33899766892499b163e60560fbbf87773 (diff) |
Merge git://git.denx.de/u-boot into x1
Conflicts:
drivers/usb/usb_ohci.c
Diffstat (limited to 'include/asm-sh/cache.h')
-rw-r--r-- | include/asm-sh/cache.h | 14 |
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 */ |