1
2
3
4
5
6
7
8
9
10#ifndef __M68360_QUICC_H
11#define __M68360_QUICC_H
12
13
14
15
16
17#include <asm/m68360_regs.h>
18#include <asm/m68360_pram.h>
19
20
21
22
23typedef struct quicc_bd {
24 volatile unsigned short status;
25 volatile unsigned short length;
26 volatile unsigned char *buf;
27} QUICC_BD;
28
29
30#ifdef MOTOROLA_ORIGINAL
31struct user_data {
32
33 volatile unsigned char udata_bd_ucode[0x400];
34 volatile unsigned char udata_bd[0x200];
35 volatile unsigned char ucode_ext[0x100];
36 volatile unsigned char RESERVED1[0x500];
37};
38#else
39struct user_data {
40
41 volatile unsigned char udata_bd_ucode[0x400];
42 volatile unsigned char udata_bd1[0x200];
43 volatile unsigned char ucode_bd_scratch[0x100];
44 volatile unsigned char udata_bd2[0x100];
45 volatile unsigned char RESERVED1[0x400];
46};
47#endif
48
49
50
51
52
53typedef struct quicc {
54 union {
55 struct quicc32_pram ch_pram_tbl[32];
56 struct user_data u;
57 }ch_or_u;
58
59
60 union {
61 struct scc_pram {
62 union {
63 struct hdlc_pram h;
64 struct uart_pram u;
65 struct bisync_pram b;
66 struct transparent_pram t;
67 unsigned char RESERVED66[0x70];
68 } pscc;
69 union {
70 struct {
71 unsigned char RESERVED70[0x10];
72 struct spi_pram spi;
73 unsigned char RESERVED72[0x8];
74 struct timer_pram timer;
75 } timer_spi;
76 struct {
77 struct idma_pram idma;
78 unsigned char RESERVED67[0x4];
79 union {
80 struct smc_uart_pram u;
81 struct smc_trnsp_pram t;
82 } psmc;
83 } idma_smc;
84 } pothers;
85 } scc;
86 struct ethernet_pram enet_scc;
87 struct global_multi_pram m;
88 unsigned char pr[0x100];
89 } pram[4];
90
91
92
93
94
95 volatile unsigned long sim_mcr;
96 volatile unsigned short sim_simtr;
97 volatile unsigned char RESERVED2[0x2];
98 volatile unsigned char sim_avr;
99 volatile unsigned char sim_rsr;
100 volatile unsigned char RESERVED3[0x2];
101 volatile unsigned char sim_clkocr;
102 volatile unsigned char RESERVED62[0x3];
103 volatile unsigned short sim_pllcr;
104 volatile unsigned char RESERVED63[0x2];
105 volatile unsigned short sim_cdvcr;
106 volatile unsigned short sim_pepar;
107 volatile unsigned char RESERVED64[0xa];
108 volatile unsigned char sim_sypcr;
109 volatile unsigned char sim_swiv;
110 volatile unsigned char RESERVED6[0x2];
111 volatile unsigned short sim_picr;
112 volatile unsigned char RESERVED7[0x2];
113 volatile unsigned short sim_pitr;
114 volatile unsigned char RESERVED8[0x3];
115 volatile unsigned char sim_swsr;
116 volatile unsigned long sim_bkar;
117 volatile unsigned long sim_bkcr;
118 volatile unsigned char RESERVED10[0x8];
119
120 volatile unsigned long memc_gmr;
121 volatile unsigned short memc_mstat;
122 volatile unsigned char RESERVED11[0xa];
123 volatile unsigned long memc_br0;
124 volatile unsigned long memc_or0;
125 volatile unsigned char RESERVED12[0x8];
126 volatile unsigned long memc_br1;
127 volatile unsigned long memc_or1;
128 volatile unsigned char RESERVED13[0x8];
129 volatile unsigned long memc_br2;
130 volatile unsigned long memc_or2;
131 volatile unsigned char RESERVED14[0x8];
132 volatile unsigned long memc_br3;
133 volatile unsigned long memc_or3;
134 volatile unsigned char RESERVED15[0x8];
135 volatile unsigned long memc_br4;
136 volatile unsigned long memc_or4;
137 volatile unsigned char RESERVED16[0x8];
138 volatile unsigned long memc_br5;
139 volatile unsigned long memc_or5;
140 volatile unsigned char RESERVED17[0x8];
141 volatile unsigned long memc_br6;
142 volatile unsigned long memc_or6;
143 volatile unsigned char RESERVED18[0x8];
144 volatile unsigned long memc_br7;
145 volatile unsigned long memc_or7;
146 volatile unsigned char RESERVED9[0x28];
147
148 volatile unsigned short test_tstmra;
149 volatile unsigned short test_tstmrb;
150 volatile unsigned short test_tstsc;
151 volatile unsigned short test_tstrc;
152 volatile unsigned short test_creg;
153 volatile unsigned short test_dreg;
154 volatile unsigned char RESERVED58[0x404];
155
156 volatile unsigned short idma_iccr;
157 volatile unsigned char RESERVED19[0x2];
158 volatile unsigned short idma1_cmr;
159 volatile unsigned char RESERVED68[0x2];
160 volatile unsigned long idma1_sapr;
161 volatile unsigned long idma1_dapr;
162 volatile unsigned long idma1_bcr;
163 volatile unsigned char idma1_fcr;
164 volatile unsigned char RESERVED20;
165 volatile unsigned char idma1_cmar;
166 volatile unsigned char RESERVED21;
167 volatile unsigned char idma1_csr;
168 volatile unsigned char RESERVED22[0x3];
169
170 volatile unsigned char sdma_sdsr;
171 volatile unsigned char RESERVED23;
172 volatile unsigned short sdma_sdcr;
173 volatile unsigned long sdma_sdar;
174
175 volatile unsigned char RESERVED69[0x2];
176 volatile unsigned short idma2_cmr;
177 volatile unsigned long idma2_sapr;
178 volatile unsigned long idma2_dapr;
179 volatile unsigned long idma2_bcr;
180 volatile unsigned char idma2_fcr;
181 volatile unsigned char RESERVED24;
182 volatile unsigned char idma2_cmar;
183 volatile unsigned char RESERVED25;
184 volatile unsigned char idma2_csr;
185 volatile unsigned char RESERVED26[0x7];
186
187 volatile unsigned long intr_cicr;
188 volatile unsigned long intr_cipr;
189 volatile unsigned long intr_cimr;
190 volatile unsigned long intr_cisr;
191
192 volatile unsigned short pio_padir;
193 volatile unsigned short pio_papar;
194 volatile unsigned short pio_paodr;
195 volatile unsigned short pio_padat;
196 volatile unsigned char RESERVED28[0x8];
197 volatile unsigned short pio_pcdir;
198 volatile unsigned short pio_pcpar;
199 volatile unsigned short pio_pcso;
200 volatile unsigned short pio_pcdat;
201 volatile unsigned short pio_pcint;
202 volatile unsigned char RESERVED29[0x16];
203
204 volatile unsigned short timer_tgcr;
205 volatile unsigned char RESERVED30[0xe];
206 volatile unsigned short timer_tmr1;
207 volatile unsigned short timer_tmr2;
208 volatile unsigned short timer_trr1;
209 volatile unsigned short timer_trr2;
210 volatile unsigned short timer_tcr1;
211 volatile unsigned short timer_tcr2;
212 volatile unsigned short timer_tcn1;
213 volatile unsigned short timer_tcn2;
214 volatile unsigned short timer_tmr3;
215 volatile unsigned short timer_tmr4;
216 volatile unsigned short timer_trr3;
217 volatile unsigned short timer_trr4;
218 volatile unsigned short timer_tcr3;
219 volatile unsigned short timer_tcr4;
220 volatile unsigned short timer_tcn3;
221 volatile unsigned short timer_tcn4;
222 volatile unsigned short timer_ter1;
223 volatile unsigned short timer_ter2;
224 volatile unsigned short timer_ter3;
225 volatile unsigned short timer_ter4;
226 volatile unsigned char RESERVED34[0x8];
227
228 volatile unsigned short cp_cr;
229 volatile unsigned char RESERVED35[0x2];
230 volatile unsigned short cp_rccr;
231 volatile unsigned char RESERVED37;
232 volatile unsigned char cp_rmds;
233 volatile unsigned long cp_rmdr;
234 volatile unsigned short cp_rctr1;
235 volatile unsigned short cp_rctr2;
236 volatile unsigned short cp_rctr3;
237 volatile unsigned short cp_rctr4;
238 volatile unsigned char RESERVED59[0x2];
239 volatile unsigned short cp_rter;
240 volatile unsigned char RESERVED38[0x2];
241 volatile unsigned short cp_rtmr;
242 volatile unsigned char RESERVED39[0x14];
243
244 union {
245 volatile unsigned long l;
246 struct {
247 volatile unsigned short BRGC_RESERV:14;
248 volatile unsigned short rst:1;
249 volatile unsigned short en:1;
250 volatile unsigned short extc:2;
251 volatile unsigned short atb:1;
252 volatile unsigned short cd:12;
253 volatile unsigned short div16:1;
254 } b;
255 } brgc[4];
256
257 struct scc_regs {
258 union {
259 struct {
260
261 volatile unsigned short GSMR_RESERV2:1;
262 volatile unsigned short edge:2;
263 volatile unsigned short tci:1;
264 volatile unsigned short tsnc:2;
265 volatile unsigned short rinv:1;
266 volatile unsigned short tinv:1;
267 volatile unsigned short tpl:3;
268 volatile unsigned short tpp:2;
269 volatile unsigned short tend:1;
270 volatile unsigned short tdcr:2;
271 volatile unsigned short rdcr:2;
272 volatile unsigned short renc:3;
273 volatile unsigned short tenc:3;
274 volatile unsigned short diag:2;
275 volatile unsigned short enr:1;
276 volatile unsigned short ent:1;
277 volatile unsigned short mode:4;
278
279 volatile unsigned short GSMR_RESERV1:14;
280 volatile unsigned short pri:1;
281 volatile unsigned short gde:1;
282 volatile unsigned short tcrc:2;
283 volatile unsigned short revd:1;
284 volatile unsigned short trx:1;
285 volatile unsigned short ttx:1;
286 volatile unsigned short cdp:1;
287 volatile unsigned short ctsp:1;
288 volatile unsigned short cds:1;
289 volatile unsigned short ctss:1;
290 volatile unsigned short tfl:1;
291 volatile unsigned short rfw:1;
292 volatile unsigned short txsy:1;
293 volatile unsigned short synl:2;
294 volatile unsigned short rtsm:1;
295 volatile unsigned short rsyn:1;
296 } b;
297 struct {
298 volatile unsigned long low;
299 volatile unsigned long high;
300 } w;
301 } scc_gsmr;
302 volatile unsigned short scc_psmr;
303 volatile unsigned char RESERVED42[0x2];
304 volatile unsigned short scc_todr;
305 volatile unsigned short scc_dsr;
306 volatile unsigned short scc_scce;
307 volatile unsigned char RESERVED43[0x2];
308 volatile unsigned short scc_sccm;
309 volatile unsigned char RESERVED44[0x1];
310 volatile unsigned char scc_sccs;
311 volatile unsigned char RESERVED45[0x8];
312 } scc_regs[4];
313
314 struct smc_regs {
315 volatile unsigned char RESERVED46[0x2];
316 volatile unsigned short smc_smcmr;
317 volatile unsigned char RESERVED60[0x2];
318 volatile unsigned char smc_smce;
319 volatile unsigned char RESERVED47[0x3];
320 volatile unsigned char smc_smcm;
321 volatile unsigned char RESERVED48[0x5];
322 } smc_regs[2];
323
324 volatile unsigned short spi_spmode;
325 volatile unsigned char RESERVED51[0x4];
326 volatile unsigned char spi_spie;
327 volatile unsigned char RESERVED52[0x3];
328 volatile unsigned char spi_spim;
329 volatile unsigned char RESERVED53[0x2];
330 volatile unsigned char spi_spcom;
331 volatile unsigned char RESERVED54[0x4];
332
333 volatile unsigned short pip_pipc;
334 volatile unsigned char RESERVED65[0x2];
335 volatile unsigned short pip_ptpr;
336 volatile unsigned long pip_pbdir;
337 volatile unsigned long pip_pbpar;
338 volatile unsigned long pip_pbodr;
339 volatile unsigned long pip_pbdat;
340 volatile unsigned char RESERVED71[0x18];
341
342 volatile unsigned long si_simode;
343 volatile unsigned char si_sigmr;
344 volatile unsigned char RESERVED55;
345 volatile unsigned char si_sistr;
346 volatile unsigned char si_sicmr;
347 volatile unsigned char RESERVED56[0x4];
348 volatile unsigned long si_sicr;
349 volatile unsigned long si_sirp;
350 volatile unsigned char RESERVED57[0xc];
351 volatile unsigned short si_siram[0x80];
352} QUICC;
353
354#endif
355
356
357
358
359
360
361
362
363