Alexey Brodkin | 544c5f5 | 2014-02-04 12:56:13 +0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0+ |
| 5 | */ |
| 6 | |
| 7 | #ifndef __ASM_ARC_CACHE_H |
| 8 | #define __ASM_ARC_CACHE_H |
| 9 | |
| 10 | #include <config.h> |
| 11 | |
Alexey Brodkin | 6b95cca | 2015-02-03 13:58:13 +0300 | [diff] [blame] | 12 | #ifdef CONFIG_ARC_CACHE_LINE_SHIFT |
| 13 | #define CONFIG_SYS_CACHELINE_SIZE (1 << CONFIG_ARC_CACHE_LINE_SHIFT) |
| 14 | #define ARCH_DMA_MINALIGN CONFIG_SYS_CACHELINE_SIZE |
Alexey Brodkin | 544c5f5 | 2014-02-04 12:56:13 +0400 | [diff] [blame] | 15 | #else |
Alexey Brodkin | 6b95cca | 2015-02-03 13:58:13 +0300 | [diff] [blame] | 16 | /* Satisfy users of ARCH_DMA_MINALIGN */ |
| 17 | #define ARCH_DMA_MINALIGN 128 |
Alexey Brodkin | 544c5f5 | 2014-02-04 12:56:13 +0400 | [diff] [blame] | 18 | #endif |
| 19 | |
Alexey Brodkin | e41a3d5 | 2015-01-13 18:35:46 +0300 | [diff] [blame] | 20 | #if defined(ARC_MMU_ABSENT) |
| 21 | #define CONFIG_ARC_MMU_VER 0 |
| 22 | #elif defined(CONFIG_ARC_MMU_V2) |
Alexey Brodkin | f431e26 | 2015-02-03 13:58:11 +0300 | [diff] [blame] | 23 | #define CONFIG_ARC_MMU_VER 2 |
| 24 | #elif defined(CONFIG_ARC_MMU_V3) |
| 25 | #define CONFIG_ARC_MMU_VER 3 |
Alexey Brodkin | e41a3d5 | 2015-01-13 18:35:46 +0300 | [diff] [blame] | 26 | #elif defined(CONFIG_ARC_MMU_V4) |
| 27 | #define CONFIG_ARC_MMU_VER 4 |
Alexey Brodkin | f431e26 | 2015-02-03 13:58:11 +0300 | [diff] [blame] | 28 | #endif |
| 29 | |
Alexey Brodkin | 275583e | 2015-03-30 13:36:04 +0300 | [diff] [blame^] | 30 | #ifndef __ASSEMBLY__ |
| 31 | |
| 32 | #ifdef CONFIG_ISA_ARCV2 |
| 33 | void slc_enable(void); |
| 34 | void slc_disable(void); |
| 35 | void slc_flush(void); |
| 36 | void slc_invalidate(void); |
| 37 | #endif |
| 38 | |
| 39 | #endif /* __ASSEMBLY__ */ |
| 40 | |
Alexey Brodkin | 544c5f5 | 2014-02-04 12:56:13 +0400 | [diff] [blame] | 41 | #endif /* __ASM_ARC_CACHE_H */ |