1*e7ecbc05SMasahiro Yamada /* 2*e7ecbc05SMasahiro Yamada * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com> 3*e7ecbc05SMasahiro Yamada * 4*e7ecbc05SMasahiro Yamada * This program is free software; you can redistribute it and/or modify 5*e7ecbc05SMasahiro Yamada * it under the terms of the GNU General Public License as published by 6*e7ecbc05SMasahiro Yamada * the Free Software Foundation; either version 2 of the License, or 7*e7ecbc05SMasahiro Yamada * (at your option) any later version. 8*e7ecbc05SMasahiro Yamada * 9*e7ecbc05SMasahiro Yamada * This program is distributed in the hope that it will be useful, 10*e7ecbc05SMasahiro Yamada * but WITHOUT ANY WARRANTY; without even the implied warranty of 11*e7ecbc05SMasahiro Yamada * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12*e7ecbc05SMasahiro Yamada * GNU General Public License for more details. 13*e7ecbc05SMasahiro Yamada */ 14*e7ecbc05SMasahiro Yamada 15*e7ecbc05SMasahiro Yamada #ifndef __CACHE_UNIPHIER_H 16*e7ecbc05SMasahiro Yamada #define __CACHE_UNIPHIER_H 17*e7ecbc05SMasahiro Yamada 18*e7ecbc05SMasahiro Yamada #include <linux/types.h> 19*e7ecbc05SMasahiro Yamada 20*e7ecbc05SMasahiro Yamada #ifdef CONFIG_CACHE_UNIPHIER 21*e7ecbc05SMasahiro Yamada int uniphier_cache_init(void); 22*e7ecbc05SMasahiro Yamada int uniphier_cache_l2_is_enabled(void); 23*e7ecbc05SMasahiro Yamada void uniphier_cache_l2_touch_range(unsigned long start, unsigned long end); 24*e7ecbc05SMasahiro Yamada void uniphier_cache_l2_set_locked_ways(u32 way_mask); 25*e7ecbc05SMasahiro Yamada #else 26*e7ecbc05SMasahiro Yamada static inline int uniphier_cache_init(void) 27*e7ecbc05SMasahiro Yamada { 28*e7ecbc05SMasahiro Yamada return -ENODEV; 29*e7ecbc05SMasahiro Yamada } 30*e7ecbc05SMasahiro Yamada 31*e7ecbc05SMasahiro Yamada static inline int uniphier_cache_l2_is_enabled(void) 32*e7ecbc05SMasahiro Yamada { 33*e7ecbc05SMasahiro Yamada return 0; 34*e7ecbc05SMasahiro Yamada } 35*e7ecbc05SMasahiro Yamada 36*e7ecbc05SMasahiro Yamada static inline void uniphier_cache_l2_touch_range(unsigned long start, 37*e7ecbc05SMasahiro Yamada unsigned long end) 38*e7ecbc05SMasahiro Yamada { 39*e7ecbc05SMasahiro Yamada } 40*e7ecbc05SMasahiro Yamada 41*e7ecbc05SMasahiro Yamada static inline void uniphier_cache_l2_set_locked_ways(u32 way_mask) 42*e7ecbc05SMasahiro Yamada { 43*e7ecbc05SMasahiro Yamada } 44*e7ecbc05SMasahiro Yamada #endif 45*e7ecbc05SMasahiro Yamada 46*e7ecbc05SMasahiro Yamada #endif /* __CACHE_UNIPHIER_H */ 47