blob: 0b3ebd9f58555a54ad284f28fcaa6ca6bb2b797f [file] [log] [blame]
Alexey Brodkin544c5f52014-02-04 12:56:13 +04001/*
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 Brodkin6b95cca2015-02-03 13:58:13 +030012#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 Brodkin544c5f52014-02-04 12:56:13 +040015#else
Alexey Brodkin6b95cca2015-02-03 13:58:13 +030016/* Satisfy users of ARCH_DMA_MINALIGN */
17#define ARCH_DMA_MINALIGN 128
Alexey Brodkin544c5f52014-02-04 12:56:13 +040018#endif
19
Alexey Brodkine41a3d52015-01-13 18:35:46 +030020#if defined(ARC_MMU_ABSENT)
21#define CONFIG_ARC_MMU_VER 0
22#elif defined(CONFIG_ARC_MMU_V2)
Alexey Brodkinf431e262015-02-03 13:58:11 +030023#define CONFIG_ARC_MMU_VER 2
24#elif defined(CONFIG_ARC_MMU_V3)
25#define CONFIG_ARC_MMU_VER 3
Alexey Brodkine41a3d52015-01-13 18:35:46 +030026#elif defined(CONFIG_ARC_MMU_V4)
27#define CONFIG_ARC_MMU_VER 4
Alexey Brodkinf431e262015-02-03 13:58:11 +030028#endif
29
Alexey Brodkin275583e2015-03-30 13:36:04 +030030#ifndef __ASSEMBLY__
31
32#ifdef CONFIG_ISA_ARCV2
33void slc_enable(void);
34void slc_disable(void);
35void slc_flush(void);
36void slc_invalidate(void);
37#endif
38
39#endif /* __ASSEMBLY__ */
40
Alexey Brodkin544c5f52014-02-04 12:56:13 +040041#endif /* __ASM_ARC_CACHE_H */