]> nv-tegra.nvidia Code Review - linux-3.10.git/blob - arch/microblaze/include/asm/cache.h
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
[linux-3.10.git] / arch / microblaze / include / asm / cache.h
1 /*
2  * Cache operations
3  *
4  * Copyright (C) 2007-2009 Michal Simek <monstr@monstr.eu>
5  * Copyright (C) 2007-2009 PetaLogix
6  * Copyright (C) 2003 John Williams <jwilliams@itee.uq.edu.au>
7  *
8  * This file is subject to the terms and conditions of the GNU General
9  * Public License. See the file COPYING in the main directory of this
10  * archive for more details.
11  */
12
13 #ifndef _ASM_MICROBLAZE_CACHE_H
14 #define _ASM_MICROBLAZE_CACHE_H
15
16 #include <asm/registers.h>
17
18 #define L1_CACHE_SHIFT  2
19 /* word-granular cache in microblaze */
20 #define L1_CACHE_BYTES  (1 << L1_CACHE_SHIFT)
21
22 #define SMP_CACHE_BYTES L1_CACHE_BYTES
23
24 void _enable_icache(void);
25 void _disable_icache(void);
26 void _invalidate_icache(unsigned int addr);
27
28 #define __enable_icache()               _enable_icache()
29 #define __disable_icache()              _disable_icache()
30 #define __invalidate_icache(addr)       _invalidate_icache(addr)
31
32 void _enable_dcache(void);
33 void _disable_dcache(void);
34 void _invalidate_dcache(unsigned int addr);
35
36 #define __enable_dcache()               _enable_dcache()
37 #define __disable_dcache()              _disable_dcache()
38 #define __invalidate_dcache(addr)       _invalidate_dcache(addr)
39
40 /* FIXME - I don't think this is right */
41 #ifdef CONFIG_XILINX_UNCACHED_SHADOW
42 #define UNCACHED_SHADOW_MASK (CONFIG_XILINX_ERAM_SIZE)
43 #endif
44
45 #endif /* _ASM_MICROBLAZE_CACHE_H */