xref: /openbmc/linux/arch/nios2/include/asm/cache.h (revision 2c684d89)
1 /*
2  * Copyright (C) 2004 Microtronix Datacom Ltd.
3  *
4  * All rights reserved.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
14  * NON INFRINGEMENT.  See the GNU General Public License for more
15  * details.
16  */
17 
18 #ifndef _ASM_NIOS2_CACHE_H
19 #define _ASM_NIOS2_CACHE_H
20 
21 #define NIOS2_DCACHE_SIZE	CONFIG_NIOS2_DCACHE_SIZE
22 #define NIOS2_ICACHE_SIZE	CONFIG_NIOS2_ICACHE_SIZE
23 #define NIOS2_DCACHE_LINE_SIZE	CONFIG_NIOS2_DCACHE_LINE_SIZE
24 #define NIOS2_ICACHE_LINE_SHIFT	5
25 #define NIOS2_ICACHE_LINE_SIZE	(1 << NIOS2_ICACHE_LINE_SHIFT)
26 
27 /* bytes per L1 cache line */
28 #define L1_CACHE_SHIFT		NIOS2_ICACHE_LINE_SHIFT
29 #define L1_CACHE_BYTES		NIOS2_ICACHE_LINE_SIZE
30 
31 #define ARCH_DMA_MINALIGN	L1_CACHE_BYTES
32 
33 #define __cacheline_aligned
34 #define ____cacheline_aligned
35 
36 #endif
37