mxs: delete old kernel versions
[openwrt/openwrt.git] / target / linux / bcm53xx / patches-4.1 / 072-ARM-l2c-clean-up-l2c_configure.patch
1 From 50beefde30224888d6d63224405ace4bdd4b32a0 Mon Sep 17 00:00:00 2001
2 From: Russell King <rmk+kernel@arm.linux.org.uk>
3 Date: Fri, 15 May 2015 11:05:54 +0100
4 Subject: [PATCH 72/74] ARM: l2c: clean up l2c_configure()
5
6 l2c_configure() does not follow the pattern of other l2c_* functions.
7 Fix this so that it does to avoid future confusion.
8
9 Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
10 ---
11 arch/arm/mm/cache-l2x0.c | 23 ++++++++++++++---------
12 1 file changed, 14 insertions(+), 9 deletions(-)
13
14 --- a/arch/arm/mm/cache-l2x0.c
15 +++ b/arch/arm/mm/cache-l2x0.c
16 @@ -110,15 +110,7 @@ static inline void l2c_unlock(void __iom
17
18 static void l2c_configure(void __iomem *base)
19 {
20 - if (outer_cache.configure) {
21 - outer_cache.configure(&l2x0_saved_regs);
22 - return;
23 - }
24 -
25 l2c_write_sec(l2x0_saved_regs.aux_ctrl, base, L2X0_AUX_CTRL);
26 -
27 - if (l2x0_data->configure)
28 - l2x0_data->configure(base);
29 }
30
31 /*
32 @@ -130,7 +122,11 @@ static void l2c_enable(void __iomem *bas
33 unsigned long flags;
34
35 l2x0_saved_regs.aux_ctrl = aux;
36 - l2c_configure(base);
37 +
38 + if (outer_cache.configure)
39 + outer_cache.configure(&l2x0_saved_regs);
40 + else
41 + l2x0_data->configure(base);
42
43 l2c_unlock(base, num_lock);
44
45 @@ -252,6 +248,7 @@ static const struct l2c_init_data l2c210
46 .num_lock = 1,
47 .enable = l2c_enable,
48 .save = l2c_save,
49 + .configure = l2c_configure,
50 .outer_cache = {
51 .inv_range = l2c210_inv_range,
52 .clean_range = l2c210_clean_range,
53 @@ -409,6 +406,7 @@ static const struct l2c_init_data l2c220
54 .num_lock = 1,
55 .enable = l2c220_enable,
56 .save = l2c_save,
57 + .configure = l2c_configure,
58 .outer_cache = {
59 .inv_range = l2c220_inv_range,
60 .clean_range = l2c220_clean_range,
61 @@ -569,6 +567,8 @@ static void l2c310_configure(void __iome
62 {
63 unsigned revision;
64
65 + l2c_configure(base);
66 +
67 /* restore pl310 setup */
68 l2c_write_sec(l2x0_saved_regs.tag_latency, base,
69 L310_TAG_LATENCY_CTRL);
70 @@ -1066,6 +1066,7 @@ static const struct l2c_init_data of_l2c
71 .of_parse = l2x0_of_parse,
72 .enable = l2c_enable,
73 .save = l2c_save,
74 + .configure = l2c_configure,
75 .outer_cache = {
76 .inv_range = l2c210_inv_range,
77 .clean_range = l2c210_clean_range,
78 @@ -1084,6 +1085,7 @@ static const struct l2c_init_data of_l2c
79 .of_parse = l2x0_of_parse,
80 .enable = l2c220_enable,
81 .save = l2c_save,
82 + .configure = l2c_configure,
83 .outer_cache = {
84 .inv_range = l2c220_inv_range,
85 .clean_range = l2c220_clean_range,
86 @@ -1416,6 +1418,7 @@ static const struct l2c_init_data of_aur
87 .enable = l2c_enable,
88 .fixup = aurora_fixup,
89 .save = aurora_save,
90 + .configure = l2c_configure,
91 .outer_cache = {
92 .inv_range = aurora_inv_range,
93 .clean_range = aurora_clean_range,
94 @@ -1435,6 +1438,7 @@ static const struct l2c_init_data of_aur
95 .enable = aurora_enable_no_outer,
96 .fixup = aurora_fixup,
97 .save = aurora_save,
98 + .configure = l2c_configure,
99 .outer_cache = {
100 .resume = l2c_resume,
101 },
102 @@ -1608,6 +1612,7 @@ static void __init tauros3_save(void __i
103
104 static void tauros3_configure(void __iomem *base)
105 {
106 + l2c_configure(base);
107 writel_relaxed(l2x0_saved_regs.aux2_ctrl,
108 base + TAUROS3_AUX2_CTRL);
109 writel_relaxed(l2x0_saved_regs.prefetch_ctrl,