]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - arch/arm/include/asm/hardware/cache-uniphier.h
Merge remote-tracking branch 'tip/auto-latest'
[karo-tx-linux.git] / arch / arm / include / asm / hardware / cache-uniphier.h
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
21 int uniphier_cache_init(void);
22 int uniphier_cache_l2_is_enabled(void);
23 void uniphier_cache_l2_touch_range(unsigned long start, unsigned long end);
24 void uniphier_cache_l2_set_locked_ways(u32 way_mask);
25 #else
26 static inline int uniphier_cache_init(void)
27 {
28         return -ENODEV;
29 }
30
31 static inline int uniphier_cache_l2_is_enabled(void)
32 {
33         return 0;
34 }
35
36 static inline void uniphier_cache_l2_touch_range(unsigned long start,
37                                                  unsigned long end)
38 {
39 }
40
41 static inline void uniphier_cache_l2_set_locked_ways(u32 way_mask)
42 {
43 }
44 #endif
45
46 #endif /* __CACHE_UNIPHIER_H */