diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-03-16 15:38:25 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-05-29 19:50:35 -0400 |
commit | 678ea28b7c3cc9a7196192dc77dfc13513db3d5f (patch) | |
tree | 78c60c2d2da81dc9ff2e73f7fa62b7e18f3dcf43 /arch/arm | |
parent | 851d6d7117b97d72a0ae84a4d6640d310ea63d1b (diff) |
ARM: l2c: remove old .set_debug method
We no longer need or require the .set_debug method; we handle everything
it used to do via the .write_sec method instead.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/include/asm/outercache.h | 1 | ||||
-rw-r--r-- | arch/arm/mm/cache-l2x0.c | 21 |
2 files changed, 2 insertions, 20 deletions
diff --git a/arch/arm/include/asm/outercache.h b/arch/arm/include/asm/outercache.h index 864afe2114d3..891a56b35bcf 100644 --- a/arch/arm/include/asm/outercache.h +++ b/arch/arm/include/asm/outercache.h | |||
@@ -35,7 +35,6 @@ struct outer_cache_fns { | |||
35 | void (*resume)(void); | 35 | void (*resume)(void); |
36 | 36 | ||
37 | /* This is an ARM L2C thing */ | 37 | /* This is an ARM L2C thing */ |
38 | void (*set_debug)(unsigned long); | ||
39 | void (*write_sec)(unsigned long, unsigned); | 38 | void (*write_sec)(unsigned long, unsigned); |
40 | }; | 39 | }; |
41 | 40 | ||
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index c4f3e8dc64ff..ae6e71b3295c 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c | |||
@@ -81,10 +81,7 @@ static void l2c_write_sec(unsigned long val, void __iomem *base, unsigned reg) | |||
81 | */ | 81 | */ |
82 | static inline void l2c_set_debug(void __iomem *base, unsigned long val) | 82 | static inline void l2c_set_debug(void __iomem *base, unsigned long val) |
83 | { | 83 | { |
84 | if (outer_cache.set_debug) | 84 | l2c_write_sec(val, base, L2X0_DEBUG_CTRL); |
85 | outer_cache.set_debug(val); | ||
86 | else | ||
87 | l2c_write_sec(val, base, L2X0_DEBUG_CTRL); | ||
88 | } | 85 | } |
89 | 86 | ||
90 | static void __l2c_op_way(void __iomem *reg) | 87 | static void __l2c_op_way(void __iomem *reg) |
@@ -155,8 +152,7 @@ static inline void cache_sync(void) | |||
155 | #if defined(CONFIG_PL310_ERRATA_588369) || defined(CONFIG_PL310_ERRATA_727915) | 152 | #if defined(CONFIG_PL310_ERRATA_588369) || defined(CONFIG_PL310_ERRATA_727915) |
156 | static inline void debug_writel(unsigned long val) | 153 | static inline void debug_writel(unsigned long val) |
157 | { | 154 | { |
158 | if (outer_cache.set_debug || outer_cache.write_sec) | 155 | l2c_set_debug(l2x0_base, val); |
159 | l2c_set_debug(l2x0_base, val); | ||
160 | } | 156 | } |
161 | #else | 157 | #else |
162 | /* Optimised out for non-errata case */ | 158 | /* Optimised out for non-errata case */ |
@@ -514,11 +510,6 @@ static const struct l2c_init_data l2c220_data = { | |||
514 | * Affects: store buffer | 510 | * Affects: store buffer |
515 | * store buffer is not automatically drained. | 511 | * store buffer is not automatically drained. |
516 | */ | 512 | */ |
517 | static void l2c310_set_debug(unsigned long val) | ||
518 | { | ||
519 | writel_relaxed(val, l2x0_base + L2X0_DEBUG_CTRL); | ||
520 | } | ||
521 | |||
522 | static void l2c310_inv_range_erratum(unsigned long start, unsigned long end) | 513 | static void l2c310_inv_range_erratum(unsigned long start, unsigned long end) |
523 | { | 514 | { |
524 | void __iomem *base = l2x0_base; | 515 | void __iomem *base = l2x0_base; |
@@ -695,10 +686,6 @@ static void __init l2c310_fixup(void __iomem *base, u32 cache_id, | |||
695 | const char *errata[8]; | 686 | const char *errata[8]; |
696 | unsigned n = 0; | 687 | unsigned n = 0; |
697 | 688 | ||
698 | /* For compatibility */ | ||
699 | if (revision <= L310_CACHE_ID_RTL_R3P0) | ||
700 | fns->set_debug = l2c310_set_debug; | ||
701 | |||
702 | if (IS_ENABLED(CONFIG_PL310_ERRATA_588369) && | 689 | if (IS_ENABLED(CONFIG_PL310_ERRATA_588369) && |
703 | revision < L310_CACHE_ID_RTL_R2P0 && | 690 | revision < L310_CACHE_ID_RTL_R2P0 && |
704 | /* For bcm compatibility */ | 691 | /* For bcm compatibility */ |
@@ -759,7 +746,6 @@ static const struct l2c_init_data l2c310_init_fns __initconst = { | |||
759 | .flush_all = l2c210_flush_all, | 746 | .flush_all = l2c210_flush_all, |
760 | .disable = l2c_disable, | 747 | .disable = l2c_disable, |
761 | .sync = l2c210_sync, | 748 | .sync = l2c210_sync, |
762 | .set_debug = l2c310_set_debug, | ||
763 | .resume = l2c310_resume, | 749 | .resume = l2c310_resume, |
764 | }, | 750 | }, |
765 | }; | 751 | }; |
@@ -819,8 +805,6 @@ static void __init __l2c_init(const struct l2c_init_data *data, | |||
819 | fns.write_sec = outer_cache.write_sec; | 805 | fns.write_sec = outer_cache.write_sec; |
820 | if (data->fixup) | 806 | if (data->fixup) |
821 | data->fixup(l2x0_base, cache_id, &fns); | 807 | data->fixup(l2x0_base, cache_id, &fns); |
822 | if (fns.write_sec) | ||
823 | fns.set_debug = NULL; | ||
824 | 808 | ||
825 | /* | 809 | /* |
826 | * Check if l2x0 controller is already enabled. If we are booting | 810 | * Check if l2x0 controller is already enabled. If we are booting |
@@ -1000,7 +984,6 @@ static const struct l2c_init_data of_l2c310_data __initconst = { | |||
1000 | .flush_all = l2c210_flush_all, | 984 | .flush_all = l2c210_flush_all, |
1001 | .disable = l2c_disable, | 985 | .disable = l2c_disable, |
1002 | .sync = l2c210_sync, | 986 | .sync = l2c210_sync, |
1003 | .set_debug = l2c310_set_debug, | ||
1004 | .resume = l2c310_resume, | 987 | .resume = l2c310_resume, |
1005 | }, | 988 | }, |
1006 | }; | 989 | }; |