aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/hardware/cache-uniphier.h
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2015-10-02 00:42:19 -0400
committerOlof Johansson <olof@lixom.net>2015-10-26 20:20:50 -0400
commite7ecbc057bc5cffb8ad10b6bf7a80684fd426d23 (patch)
treed3d5e1647981c5690d4a66270ab246a60ebe7e01 /arch/arm/include/asm/hardware/cache-uniphier.h
parent156746b1733057e50b3b3cb33c3669dac06676ab (diff)
ARM: uniphier: add outer cache support
This commit adds support for UniPhier outer cache controller. All the UniPhier SoCs are equipped with the L2 cache, while the L3 cache is currently only integrated on PH1-Pro5 SoC. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/include/asm/hardware/cache-uniphier.h')
-rw-r--r--arch/arm/include/asm/hardware/cache-uniphier.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/arch/arm/include/asm/hardware/cache-uniphier.h b/arch/arm/include/asm/hardware/cache-uniphier.h
new file mode 100644
index 000000000000..102e3fbe1e10
--- /dev/null
+++ b/arch/arm/include/asm/hardware/cache-uniphier.h
@@ -0,0 +1,46 @@
1/*
2 * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 */
14
15#ifndef __CACHE_UNIPHIER_H
16#define __CACHE_UNIPHIER_H
17
18#include <linux/types.h>
19
20#ifdef CONFIG_CACHE_UNIPHIER
21int uniphier_cache_init(void);
22int uniphier_cache_l2_is_enabled(void);
23void uniphier_cache_l2_touch_range(unsigned long start, unsigned long end);
24void uniphier_cache_l2_set_locked_ways(u32 way_mask);
25#else
26static inline int uniphier_cache_init(void)
27{
28 return -ENODEV;
29}
30
31static inline int uniphier_cache_l2_is_enabled(void)
32{
33 return 0;
34}
35
36static inline void uniphier_cache_l2_touch_range(unsigned long start,
37 unsigned long end)
38{
39}
40
41static inline void uniphier_cache_l2_set_locked_ways(u32 way_mask)
42{
43}
44#endif
45
46#endif /* __CACHE_UNIPHIER_H */