diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-03-15 12:48:16 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-05-29 19:48:13 -0400 |
commit | bda0b74e6a5a4ce25198f55889bb321532c63d92 (patch) | |
tree | 2a86f26796e266e4049ea447afaaa53ac26c5d4a /arch/arm/mm/cache-l2x0.c | |
parent | faf9b2e7018b0afede92329c5b35e5d113a07f1c (diff) |
ARM: l2c: move pl310_set_debug() into l2c-310 code
Move the pl310_set_debug() into the l2c-310 code area, and don't hide
it with ifdefs. Rename it to l2c310_set_debug().
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/cache-l2x0.c')
-rw-r--r-- | arch/arm/mm/cache-l2x0.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index 157fd7ae331a..9586be73ca4f 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c | |||
@@ -154,18 +154,11 @@ static inline void debug_writel(unsigned long val) | |||
154 | if (outer_cache.set_debug) | 154 | if (outer_cache.set_debug) |
155 | l2c_set_debug(l2x0_base, val); | 155 | l2c_set_debug(l2x0_base, val); |
156 | } | 156 | } |
157 | |||
158 | static void pl310_set_debug(unsigned long val) | ||
159 | { | ||
160 | writel_relaxed(val, l2x0_base + L2X0_DEBUG_CTRL); | ||
161 | } | ||
162 | #else | 157 | #else |
163 | /* Optimised out for non-errata case */ | 158 | /* Optimised out for non-errata case */ |
164 | static inline void debug_writel(unsigned long val) | 159 | static inline void debug_writel(unsigned long val) |
165 | { | 160 | { |
166 | } | 161 | } |
167 | |||
168 | #define pl310_set_debug NULL | ||
169 | #endif | 162 | #endif |
170 | 163 | ||
171 | #ifdef CONFIG_PL310_ERRATA_588369 | 164 | #ifdef CONFIG_PL310_ERRATA_588369 |
@@ -422,6 +415,11 @@ static const struct l2c_init_data l2x0_init_fns __initconst = { | |||
422 | * Affects: store buffer | 415 | * Affects: store buffer |
423 | * store buffer is not automatically drained. | 416 | * store buffer is not automatically drained. |
424 | */ | 417 | */ |
418 | static void l2c310_set_debug(unsigned long val) | ||
419 | { | ||
420 | writel_relaxed(val, l2x0_base + L2X0_DEBUG_CTRL); | ||
421 | } | ||
422 | |||
425 | static void __init l2c310_save(void __iomem *base) | 423 | static void __init l2c310_save(void __iomem *base) |
426 | { | 424 | { |
427 | unsigned revision; | 425 | unsigned revision; |
@@ -488,7 +486,7 @@ static void __init l2c310_fixup(void __iomem *base, u32 cache_id, | |||
488 | unsigned n = 0; | 486 | unsigned n = 0; |
489 | 487 | ||
490 | if (revision <= L310_CACHE_ID_RTL_R3P0) | 488 | if (revision <= L310_CACHE_ID_RTL_R3P0) |
491 | fns->set_debug = pl310_set_debug; | 489 | fns->set_debug = l2c310_set_debug; |
492 | 490 | ||
493 | if (IS_ENABLED(CONFIG_PL310_ERRATA_753970) && | 491 | if (IS_ENABLED(CONFIG_PL310_ERRATA_753970) && |
494 | revision == L310_CACHE_ID_RTL_R3P0) { | 492 | revision == L310_CACHE_ID_RTL_R3P0) { |