]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/arm/amlogic/aml8726/aml8726_ccm.h
arm: clean up empty lines in .c and .h files
[FreeBSD/FreeBSD.git] / sys / arm / amlogic / aml8726 / aml8726_ccm.h
1 /*-
2  * Copyright 2015 John Wehle <john@feith.com>
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  *
14  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24  * SUCH DAMAGE.
25  *
26  * $FreeBSD$
27  */
28
29 #ifndef _ARM_AMLOGIC_AML8726_CCM_H
30 #define _ARM_AMLOGIC_AML8726_CCM_H
31
32 struct aml8726_ccm_gate {
33         uint32_t addr;
34         uint32_t bits;
35 };
36
37 struct aml8726_ccm_function {
38         const char *name;
39         struct aml8726_ccm_gate *gates;
40 };
41
42 /*
43  * aml8726-m3
44  */
45
46 static struct aml8726_ccm_gate aml8726_m3_ethernet[] = {
47         { 4, 0x00000008 },
48         { 0, 0x00000000 }
49 };
50
51 static struct aml8726_ccm_gate aml8726_m3_i2c[] = {
52         { 0, 0x00000200 },
53         { 0, 0x00000000 }
54 };
55
56 static struct aml8726_ccm_gate aml8726_m3_rng[] = {
57         {  0, 0x00001000 },
58         {  0, 0x00000000 }
59 };
60
61 static struct aml8726_ccm_gate aml8726_m3_sdio[] = {
62         { 0, 0x00020000 },
63         { 0, 0x00000000 }
64 };
65
66 static struct aml8726_ccm_gate aml8726_m3_sdxc[] = {
67         { 0, 0x00004000 },
68         { 0, 0x00000000 }
69 };
70
71 static struct aml8726_ccm_gate aml8726_m3_uart_a[] = {
72         { 0, 0x00002000 },
73         { 0, 0x00000000 }
74 };
75
76 static struct aml8726_ccm_gate aml8726_m3_uart_b[] = {
77         { 4, 0x00010000 },
78         { 0, 0x00000000 }
79 };
80
81 static struct aml8726_ccm_gate aml8726_m3_uart_c[] = {
82         { 8, 0x00008000 },
83         { 0, 0x00000000 }
84 };
85
86 static struct aml8726_ccm_gate aml8726_m3_usb_a[] = {
87         { 4, 0x00200000 },
88         { 0, 0x00000000 }
89 };
90
91 static struct aml8726_ccm_gate aml8726_m3_usb_b[] = {
92         { 4, 0x00400000 },
93         { 0, 0x00000000 }
94 };
95
96 struct aml8726_ccm_function aml8726_m3_ccm[] = {
97         { "ethernet", aml8726_m3_ethernet },
98         { "i2c", aml8726_m3_i2c },
99         { "rng", aml8726_m3_rng },
100         { "sdio", aml8726_m3_sdio },
101         { "sdxc", aml8726_m3_sdxc },
102         { "uart-a", aml8726_m3_uart_a },
103         { "uart-b", aml8726_m3_uart_b },
104         { "uart-c", aml8726_m3_uart_c },
105         { "usb-a", aml8726_m3_usb_a },
106         { "usb-b", aml8726_m3_usb_b },
107         { NULL }
108 };
109
110 /*
111  * aml8726-m6
112  */
113
114 static struct aml8726_ccm_gate aml8726_m6_ethernet[] = {
115         { 4, 0x00000008 },
116         { 0, 0x00000000 }
117 };
118
119 static struct aml8726_ccm_gate aml8726_m6_i2c[] = {
120         { 0, 0x00000200 },
121         { 0, 0x00000000 }
122 };
123
124 static struct aml8726_ccm_gate aml8726_m6_rng[] = {
125         {  0, 0x00001000 },
126         {  0, 0x00000000 }
127 };
128
129 static struct aml8726_ccm_gate aml8726_m6_sdio[] = {
130         { 0, 0x00020000 },
131         { 0, 0x00000000 }
132 };
133
134 static struct aml8726_ccm_gate aml8726_m6_sdxc[] = {
135         { 0, 0x00004000 },
136         { 0, 0x00000000 }
137 };
138
139 static struct aml8726_ccm_gate aml8726_m6_uart_a[] = {
140         { 0, 0x00002000 },
141         { 0, 0x00000000 }
142 };
143
144 static struct aml8726_ccm_gate aml8726_m6_uart_b[] = {
145         { 4, 0x00010000 },
146         { 0, 0x00000000 }
147 };
148
149 static struct aml8726_ccm_gate aml8726_m6_uart_c[] = {
150         { 8, 0x00008000 },
151         { 0, 0x00000000 }
152 };
153
154 static struct aml8726_ccm_gate aml8726_m6_usb_a[] = {
155         { 4, 0x00200000 },
156         { 0, 0x00000000 }
157 };
158
159 static struct aml8726_ccm_gate aml8726_m6_usb_b[] = {
160         { 4, 0x00400000 },
161         { 0, 0x00000000 }
162 };
163
164 struct aml8726_ccm_function aml8726_m6_ccm[] = {
165         { "ethernet", aml8726_m6_ethernet },
166         { "i2c", aml8726_m6_i2c },
167         { "rng", aml8726_m6_rng },
168         { "sdio", aml8726_m6_sdio },
169         { "sdxc", aml8726_m6_sdxc },
170         { "uart-a", aml8726_m6_uart_a },
171         { "uart-b", aml8726_m6_uart_b },
172         { "uart-c", aml8726_m6_uart_c },
173         { "usb-a", aml8726_m6_usb_a },
174         { "usb-b", aml8726_m6_usb_b },
175         { NULL }
176 };
177
178 /*
179  * aml8726-m8
180  */
181
182 static struct aml8726_ccm_gate aml8726_m8_ethernet[] = {
183         { 4, 0x00000008 },
184         { 0, 0x00000000 }
185 };
186
187 static struct aml8726_ccm_gate aml8726_m8_i2c[] = {
188         { 0, 0x00000200 },
189         { 0, 0x00000000 }
190 };
191
192 static struct aml8726_ccm_gate aml8726_m8_rng[] = {
193         {  0, 0x00001000 },
194         { 16, 0x00200000 },
195         {  0, 0x00000000 }
196 };
197
198 static struct aml8726_ccm_gate aml8726_m8_sdio[] = {
199         { 0, 0x00020000 },
200         { 0, 0x00000000 }
201 };
202
203 static struct aml8726_ccm_gate aml8726_m8_sdxc[] = {
204         { 0, 0x00004000 },
205         { 0, 0x00000000 }
206 };
207
208 static struct aml8726_ccm_gate aml8726_m8_uart_a[] = {
209         { 0, 0x00002000 },
210         { 0, 0x00000000 }
211 };
212
213 static struct aml8726_ccm_gate aml8726_m8_uart_b[] = {
214         { 4, 0x00010000 },
215         { 0, 0x00000000 }
216 };
217
218 static struct aml8726_ccm_gate aml8726_m8_uart_c[] = {
219         { 8, 0x00008000 },
220         { 0, 0x00000000 }
221 };
222
223 static struct aml8726_ccm_gate aml8726_m8_usb_a[] = {
224         { 4, 0x00200000 },
225         { 4, 0x04000000 },
226         { 0, 0x00000000 }
227 };
228
229 static struct aml8726_ccm_gate aml8726_m8_usb_b[] = {
230         { 4, 0x00400000 },
231         { 4, 0x04000000 },
232         { 0, 0x00000000 }
233 };
234
235 struct aml8726_ccm_function aml8726_m8_ccm[] = {
236         { "ethernet", aml8726_m8_ethernet },
237         { "i2c", aml8726_m8_i2c },
238         { "rng", aml8726_m8_rng },
239         { "sdio", aml8726_m8_sdio },
240         { "sdxc", aml8726_m8_sdxc },
241         { "uart-a", aml8726_m8_uart_a },
242         { "uart-b", aml8726_m8_uart_b },
243         { "uart-c", aml8726_m8_uart_c },
244         { "usb-a", aml8726_m8_usb_a },
245         { "usb-b", aml8726_m8_usb_b },
246         { NULL }
247 };
248
249 /*
250  * aml8726-m8b
251  */
252
253 static struct aml8726_ccm_gate aml8726_m8b_ethernet[] = {
254         { 4, 0x00000008 },
255         { 0, 0x00000000 }
256 };
257
258 static struct aml8726_ccm_gate aml8726_m8b_i2c[] = {
259         { 0, 0x00000200 },
260         { 0, 0x00000000 }
261 };
262
263 static struct aml8726_ccm_gate aml8726_m8b_rng[] = {
264         {  0, 0x00001000 },
265         { 16, 0x00200000 },
266         {  0, 0x00000000 }
267 };
268
269 static struct aml8726_ccm_gate aml8726_m8b_sdio[] = {
270         { 0, 0x00020000 },
271         { 0, 0x00000000 }
272 };
273
274 static struct aml8726_ccm_gate aml8726_m8b_sdxc[] = {
275         { 0, 0x00004000 },
276         { 0, 0x00000000 }
277 };
278
279 static struct aml8726_ccm_gate aml8726_m8b_uart_a[] = {
280         { 0, 0x00002000 },
281         { 0, 0x00000000 }
282 };
283
284 static struct aml8726_ccm_gate aml8726_m8b_uart_b[] = {
285         { 4, 0x00010000 },
286         { 0, 0x00000000 }
287 };
288
289 static struct aml8726_ccm_gate aml8726_m8b_uart_c[] = {
290         { 8, 0x00008000 },
291         { 0, 0x00000000 }
292 };
293
294 static struct aml8726_ccm_gate aml8726_m8b_usb_a[] = {
295         { 4, 0x00200000 },
296         { 4, 0x04000000 },
297         { 0, 0x00000000 }
298 };
299
300 static struct aml8726_ccm_gate aml8726_m8b_usb_b[] = {
301         { 4, 0x00400000 },
302         { 4, 0x04000000 },
303         { 0, 0x00000000 }
304 };
305
306 struct aml8726_ccm_function aml8726_m8b_ccm[] = {
307         { "ethernet", aml8726_m8b_ethernet },
308         { "i2c", aml8726_m8b_i2c },
309         { "rng", aml8726_m8b_rng },
310         { "sdio", aml8726_m8b_sdio },
311         { "sdxc", aml8726_m8b_sdxc },
312         { "uart-a", aml8726_m8b_uart_a },
313         { "uart-b", aml8726_m8b_uart_b },
314         { "uart-c", aml8726_m8b_uart_c },
315         { "usb-a", aml8726_m8b_usb_a },
316         { "usb-b", aml8726_m8b_usb_b },
317         { NULL }
318 };
319
320 #endif /* _ARM_AMLOGIC_AML8726_CCM_H */