aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2014-03-16 13:19:21 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2014-05-29 19:47:32 -0400
commit2b2a87a12d2e0aede29e45911aeb0c520066b0c0 (patch)
tree4f7f2e8528238eae06c66ab8d84b3939b476b7ca
parentc02642bc1010b7ef8a4b87763ab28f5e4ab1d823 (diff)
ARM: l2c: provide generic function for calling set_debug method
Provide a generic function which always calls the set_debug method. This will be used later in the series as some work-arounds require that the debug register be written. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/mm/cache-l2x0.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index d659c4ca46bb..595c50519e41 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -57,6 +57,16 @@ static inline void cache_wait_way(void __iomem *reg, unsigned long mask)
57 cpu_relax(); 57 cpu_relax();
58} 58}
59 59
60/*
61 * This should only be called when we have a requirement that the
62 * register be written due to a work-around, as platforms running
63 * in non-secure mode may not be able to access this register.
64 */
65static inline void l2c_set_debug(void __iomem *base, unsigned long val)
66{
67 outer_cache.set_debug(val);
68}
69
60#ifdef CONFIG_CACHE_PL310 70#ifdef CONFIG_CACHE_PL310
61static inline void cache_wait(void __iomem *reg, unsigned long mask) 71static inline void cache_wait(void __iomem *reg, unsigned long mask)
62{ 72{
@@ -92,7 +102,7 @@ static inline void l2x0_inv_line(unsigned long addr)
92static inline void debug_writel(unsigned long val) 102static inline void debug_writel(unsigned long val)
93{ 103{
94 if (outer_cache.set_debug) 104 if (outer_cache.set_debug)
95 outer_cache.set_debug(val); 105 l2c_set_debug(l2x0_base, val);
96} 106}
97 107
98static void pl310_set_debug(unsigned long val) 108static void pl310_set_debug(unsigned long val)