sunxi: Backport patches needed for A64
[openwrt/staging/lynxis.git] / target / linux / sunxi / patches-4.9 / 0002-clk-sunxi-ng-Rename-the-internal-structures.patch
1 From a501a14e38cc4d8e9c91bb508cdca7032d53f717 Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime.ripard@free-electrons.com>
3 Date: Fri, 30 Sep 2016 10:05:32 +0200
4 Subject: clk: sunxi-ng: Rename the internal structures
5
6 Rename the structures meant to be embedded in other structures to make it
7 consistent with the mux structure name
8
9 Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
10 Acked-by: Chen-Yu Tsai <wens@csie.org>
11 ---
12 drivers/clk/sunxi-ng/ccu_div.h | 6 +++---
13 drivers/clk/sunxi-ng/ccu_frac.c | 12 ++++++------
14 drivers/clk/sunxi-ng/ccu_frac.h | 14 +++++++-------
15 drivers/clk/sunxi-ng/ccu_mp.h | 4 ++--
16 drivers/clk/sunxi-ng/ccu_mult.h | 4 ++--
17 drivers/clk/sunxi-ng/ccu_nk.h | 4 ++--
18 drivers/clk/sunxi-ng/ccu_nkm.h | 6 +++---
19 drivers/clk/sunxi-ng/ccu_nkmp.h | 8 ++++----
20 drivers/clk/sunxi-ng/ccu_nm.h | 6 +++---
21 9 files changed, 32 insertions(+), 32 deletions(-)
22
23 --- a/drivers/clk/sunxi-ng/ccu_div.h
24 +++ b/drivers/clk/sunxi-ng/ccu_div.h
25 @@ -20,7 +20,7 @@
26 #include "ccu_mux.h"
27
28 /**
29 - * struct _ccu_div - Internal divider description
30 + * struct ccu_div_internal - Internal divider description
31 * @shift: Bit offset of the divider in its register
32 * @width: Width of the divider field in its register
33 * @max: Maximum value allowed for that divider. This is the
34 @@ -36,7 +36,7 @@
35 * It is basically a wrapper around the clk_divider functions
36 * arguments.
37 */
38 -struct _ccu_div {
39 +struct ccu_div_internal {
40 u8 shift;
41 u8 width;
42
43 @@ -78,7 +78,7 @@ struct _ccu_div {
44 struct ccu_div {
45 u32 enable;
46
47 - struct _ccu_div div;
48 + struct ccu_div_internal div;
49 struct ccu_mux_internal mux;
50 struct ccu_common common;
51 };
52 --- a/drivers/clk/sunxi-ng/ccu_frac.c
53 +++ b/drivers/clk/sunxi-ng/ccu_frac.c
54 @@ -14,7 +14,7 @@
55 #include "ccu_frac.h"
56
57 bool ccu_frac_helper_is_enabled(struct ccu_common *common,
58 - struct _ccu_frac *cf)
59 + struct ccu_frac_internal *cf)
60 {
61 if (!(common->features & CCU_FEATURE_FRACTIONAL))
62 return false;
63 @@ -23,7 +23,7 @@ bool ccu_frac_helper_is_enabled(struct c
64 }
65
66 void ccu_frac_helper_enable(struct ccu_common *common,
67 - struct _ccu_frac *cf)
68 + struct ccu_frac_internal *cf)
69 {
70 unsigned long flags;
71 u32 reg;
72 @@ -38,7 +38,7 @@ void ccu_frac_helper_enable(struct ccu_c
73 }
74
75 void ccu_frac_helper_disable(struct ccu_common *common,
76 - struct _ccu_frac *cf)
77 + struct ccu_frac_internal *cf)
78 {
79 unsigned long flags;
80 u32 reg;
81 @@ -53,7 +53,7 @@ void ccu_frac_helper_disable(struct ccu_
82 }
83
84 bool ccu_frac_helper_has_rate(struct ccu_common *common,
85 - struct _ccu_frac *cf,
86 + struct ccu_frac_internal *cf,
87 unsigned long rate)
88 {
89 if (!(common->features & CCU_FEATURE_FRACTIONAL))
90 @@ -63,7 +63,7 @@ bool ccu_frac_helper_has_rate(struct ccu
91 }
92
93 unsigned long ccu_frac_helper_read_rate(struct ccu_common *common,
94 - struct _ccu_frac *cf)
95 + struct ccu_frac_internal *cf)
96 {
97 u32 reg;
98
99 @@ -84,7 +84,7 @@ unsigned long ccu_frac_helper_read_rate(
100 }
101
102 int ccu_frac_helper_set_rate(struct ccu_common *common,
103 - struct _ccu_frac *cf,
104 + struct ccu_frac_internal *cf,
105 unsigned long rate)
106 {
107 unsigned long flags;
108 --- a/drivers/clk/sunxi-ng/ccu_frac.h
109 +++ b/drivers/clk/sunxi-ng/ccu_frac.h
110 @@ -18,7 +18,7 @@
111
112 #include "ccu_common.h"
113
114 -struct _ccu_frac {
115 +struct ccu_frac_internal {
116 u32 enable;
117 u32 select;
118
119 @@ -33,21 +33,21 @@ struct _ccu_frac {
120 }
121
122 bool ccu_frac_helper_is_enabled(struct ccu_common *common,
123 - struct _ccu_frac *cf);
124 + struct ccu_frac_internal *cf);
125 void ccu_frac_helper_enable(struct ccu_common *common,
126 - struct _ccu_frac *cf);
127 + struct ccu_frac_internal *cf);
128 void ccu_frac_helper_disable(struct ccu_common *common,
129 - struct _ccu_frac *cf);
130 + struct ccu_frac_internal *cf);
131
132 bool ccu_frac_helper_has_rate(struct ccu_common *common,
133 - struct _ccu_frac *cf,
134 + struct ccu_frac_internal *cf,
135 unsigned long rate);
136
137 unsigned long ccu_frac_helper_read_rate(struct ccu_common *common,
138 - struct _ccu_frac *cf);
139 + struct ccu_frac_internal *cf);
140
141 int ccu_frac_helper_set_rate(struct ccu_common *common,
142 - struct _ccu_frac *cf,
143 + struct ccu_frac_internal *cf,
144 unsigned long rate);
145
146 #endif /* _CCU_FRAC_H_ */
147 --- a/drivers/clk/sunxi-ng/ccu_mp.h
148 +++ b/drivers/clk/sunxi-ng/ccu_mp.h
149 @@ -29,8 +29,8 @@
150 struct ccu_mp {
151 u32 enable;
152
153 - struct _ccu_div m;
154 - struct _ccu_div p;
155 + struct ccu_div_internal m;
156 + struct ccu_div_internal p;
157 struct ccu_mux_internal mux;
158 struct ccu_common common;
159 };
160 --- a/drivers/clk/sunxi-ng/ccu_mult.h
161 +++ b/drivers/clk/sunxi-ng/ccu_mult.h
162 @@ -4,7 +4,7 @@
163 #include "ccu_common.h"
164 #include "ccu_mux.h"
165
166 -struct _ccu_mult {
167 +struct ccu_mult_internal {
168 u8 shift;
169 u8 width;
170 };
171 @@ -18,7 +18,7 @@ struct _ccu_mult {
172 struct ccu_mult {
173 u32 enable;
174
175 - struct _ccu_mult mult;
176 + struct ccu_mult_internal mult;
177 struct ccu_mux_internal mux;
178 struct ccu_common common;
179 };
180 --- a/drivers/clk/sunxi-ng/ccu_nk.h
181 +++ b/drivers/clk/sunxi-ng/ccu_nk.h
182 @@ -30,8 +30,8 @@ struct ccu_nk {
183 u32 enable;
184 u32 lock;
185
186 - struct _ccu_mult n;
187 - struct _ccu_mult k;
188 + struct ccu_mult_internal n;
189 + struct ccu_mult_internal k;
190
191 unsigned int fixed_post_div;
192
193 --- a/drivers/clk/sunxi-ng/ccu_nkm.h
194 +++ b/drivers/clk/sunxi-ng/ccu_nkm.h
195 @@ -29,9 +29,9 @@ struct ccu_nkm {
196 u32 enable;
197 u32 lock;
198
199 - struct _ccu_mult n;
200 - struct _ccu_mult k;
201 - struct _ccu_div m;
202 + struct ccu_mult_internal n;
203 + struct ccu_mult_internal k;
204 + struct ccu_div_internal m;
205 struct ccu_mux_internal mux;
206
207 struct ccu_common common;
208 --- a/drivers/clk/sunxi-ng/ccu_nkmp.h
209 +++ b/drivers/clk/sunxi-ng/ccu_nkmp.h
210 @@ -29,10 +29,10 @@ struct ccu_nkmp {
211 u32 enable;
212 u32 lock;
213
214 - struct _ccu_mult n;
215 - struct _ccu_mult k;
216 - struct _ccu_div m;
217 - struct _ccu_div p;
218 + struct ccu_mult_internal n;
219 + struct ccu_mult_internal k;
220 + struct ccu_div_internal m;
221 + struct ccu_div_internal p;
222
223 struct ccu_common common;
224 };
225 --- a/drivers/clk/sunxi-ng/ccu_nm.h
226 +++ b/drivers/clk/sunxi-ng/ccu_nm.h
227 @@ -30,9 +30,9 @@ struct ccu_nm {
228 u32 enable;
229 u32 lock;
230
231 - struct _ccu_mult n;
232 - struct _ccu_div m;
233 - struct _ccu_frac frac;
234 + struct ccu_mult_internal n;
235 + struct ccu_div_internal m;
236 + struct ccu_frac_internal frac;
237
238 struct ccu_common common;
239 };