aboutsummaryrefslogtreecommitdiff
path: root/include/asm-ppc/5xx_immap.h
blob: 72cbab43e42349179f2e85fd1fa6dd4e1a105598 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
/*
 * (C) Copyright 2003
 * Martin Winistoerfer, martinwinistoerfer@gmx.ch.
 *
 * See file CREDITS for list of people who contributed to this
 * project.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of
 * the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation,
 */

/*
 * File:		5xx_immap.h
 *
 * Discription:		MPC555 Internal Memory Map
 *
 */

#ifndef __IMMAP_5XX__
#define __IMMAP_5XX__

/* System Configuration Registers.
*/
typedef	struct sys_conf {
	uint sc_siumcr;
	uint sc_sypcr;
	char res1[6];
	ushort sc_swsr;
	uint sc_sipend;
	uint sc_simask;
	uint sc_siel;
	uint sc_sivec;
	uint sc_tesr;
	uint sc_sgpiodt1;
	uint sc_sgpiodt2;
	uint sc_sgpiocr;
	uint sc_emcr;
	uint sc_res1aa;
	uint sc_res1ab;
	uint sc_pdmcr;
	char res3[192];
} sysconf5xx_t;


/* Memory Controller Registers.
*/
typedef struct	mem_ctlr {
	uint memc_br0;
	uint memc_or0;
	uint memc_br1;
	uint memc_or1;
	uint memc_br2;
	uint memc_or2;
	uint memc_br3;
	uint memc_or3;
	char res1[32];
	uint memc_dmbr;
	uint memc_dmor;
	char res2[48];
	ushort memc_mstat;
	ushort memc_res4a;
	char res3[132];
} memctl5xx_t;

/* System Integration Timers.
*/
typedef struct	sys_int_timers {
	ushort sit_tbscr;
	char res1[2];
	uint sit_tbref0;
	uint sit_tbref1;
	char res2[20];
	ushort sit_rtcsc;
	char res3[2];
	uint sit_rtc;
	uint sit_rtsec;
	uint sit_rtcal;
	char res4[16];
	ushort sit_piscr;
	char res5[2];
	uint sit_pitc;
	uint sit_pitr;
	char res6[52];
} sit5xx_t;

/* Clocks and Reset
*/
typedef struct clk_and_reset {
	uint car_sccr;
	uint car_plprcr;
	ushort car_rsr;
	ushort car_res7a;
	ushort car_colir;
	ushort car_res7b;
	ushort car_vsrmcr;
	ushort car_res7c;
	char res1[108];

} car5xx_t;

#define TBSCR_TBE		((ushort)0x0001)

/* System Integration Timer Keys
*/
typedef struct sitk {
	uint sitk_tbscrk;
	uint sitk_tbref0k;
	uint sitk_tbref1k;
	uint sitk_tbk;
	char res1[16];
	uint sitk_rtcsck;
	uint sitk_rtck;
	uint sitk_rtseck;
	uint sitk_rtcalk;
	char res2[16];
	uint sitk_piscrk;
	uint sitk_pitck;
	char res3[56];
} sitk5xx_t;

/* Clocks and Reset Keys.
*/
typedef struct cark {
	uint	cark_sccrk;
	uint	cark_plprcrk;
	uint	cark_rsrk;
	char	res1[1140];
} cark8xx_t;

/* The key to unlock registers maintained by keep-alive power.
*/
#define KAPWR_KEY	((unsigned int)0x55ccaa33)

/* Flash Configuration
*/
typedef struct fl {
	uint fl_cmfmcr;
	uint fl_cmftst;
	uint fl_cmfctl;
	char res1[52];
} fl5xx_t;

/* Dpram Control
*/
typedef struct dprc {
	ushort dprc_dptmcr;
	ushort dprc_ramtst;
	ushort dprc_rambar;
	ushort dprc_misrh;
	ushort dprc_misrl;
	ushort dprc_miscnt;
} dprc5xx_t;

/* Time Processor Unit
*/
typedef struct tpu {
	ushort tpu_tpumcr;
	ushort tpu_tcr;
	ushort tpu_dscr;
	ushort tpu_dssr;
	ushort tpu_ticr;
	ushort tpu_cier;
	ushort tpu_cfsr0;
	ushort tpu_cfsr1;
	ushort tpu_cfsr2;
	ushort tpu_cfsr3;
	ushort tpu_hsqr0;
	ushort tpu_hsqr1;
	ushort tpu_hsrr0;
	ushort tpu_hsrr1;
	ushort tpu_cpr0;
	ushort tpu_cpr1;
	ushort tpu_cisr;
	ushort tpu_lr;
	ushort tpu_sglr;
	ushort tpu_dcnr;
	ushort tpu_tpumcr2;
	ushort tpu_tpumcr3;
	ushort tpu_isdr;
	ushort tpu_iscr;
	char   res1[208];
	char   tpu[16][16];
	char   res2[512];
} tpu5xx_t;

/* QADC
*/
typedef struct qadc {
	ushort qadc_64mcr;
	ushort qadc_64test;
	ushort qadc_64int;
	u_char  qadc_portqa;
	u_char  qadc_portqb;
	ushort qadc_ddrqa;
	ushort qadc_qacr0;
	ushort qadc_qacr1;
	ushort qadc_qacr2;
	ushort qadc_qasr0;
	ushort qadc_qasr1;
	char   res1[492];
       /* command convertion word table */
	ushort qadc_ccw[64];
       /* result word table, unsigned right justified */
	ushort qadc_rjurr[64];
       /* result word table, signed left justified */
	ushort qadc_ljsrr[64];
       /* result word table, unsigned left justified */
	ushort qadc_ljurr[64];
} qadc5xx_t;

/* QSMCM
*/
typedef struct qsmcm {
	ushort qsmcm_qsmcr;
	ushort qsmcm_qtest;
	ushort qsmcm_qdsci_il;
	ushort qsmcm_qspi_il;
	ushort qsmcm_scc1r0;
	ushort qsmcm_scc1r1;
	ushort qsmcm_sc1sr;
	ushort qsmcm_sc1dr;
	char   res1[2];
	char   res2[2];
	ushort qsmcm_portqs;
	u_char qsmcm_pqspar;
	u_char qsmcm_ddrqs;
	ushort qsmcm_spcr0;
	ushort qsmcm_spcr1;
	ushort qsmcm_spcr2;
	u_char qsmcm_spcr3;
	u_char qsmcm_spsr;
	ushort qsmcm_scc2r0;
	ushort qsmcm_scc2r1;
	ushort qsmcm_sc2sr;
	ushort qsmcm_sc2dr;
	ushort qsmcm_qsci1cr;
	ushort qsmcm_qsci1sr;
	ushort qsmcm_sctq[16];
	ushort qsmcm_scrq[16];
	char   res3[212];
	ushort qsmcm_recram[32];
	ushort qsmcm_tranram[32];
	u_char qsmcm_comdram[32];
	char   res[3616];
} qsmcm5xx_t;


/* MIOS
*/

typedef struct mios {
	ushort mios_mpwmsm0perr;                 /* mpwmsm0 */
	ushort mios_mpwmsm0pulr;
	ushort mios_mpwmsm0cntr;
	ushort mios_mpwmsm0scr;
	ushort mios_mpwmsm1perr;                 /* mpwmsm1 */
	ushort mios_mpwmsm1pulr;
	ushort mios_mpwmsm1cntr;
	ushort mios_mpwmsm1scr;
	ushort mios_mpwmsm2perr;                 /* mpwmsm2 */
	ushort mios_mpwmsm2pulr;
	ushort mios_mpwmsm2cntr;
	ushort mios_mpwmsm2scr;
	ushort mios_mpwmsm3perr;                 /* mpwmsm3 */
	ushort mios_mpwmsm3pulr;
	ushort mios_mpwmsm3cntr;
	ushort mios_mpwmsm3scr;
	char res1[16];
	ushort mios_mmcsm6cnt;                   /* mmcsm6 */
	ushort mios_mmcsm6mlr;
	ushort mios_mmcsm6scrd, mmcsm6scr;
	char res2[32];
	ushort mios_mdasm11ar;                   /* mdasm11 */
	ushort mios_mdasm11br;
	ushort mios_mdasm11scrd, mdasm11scr;
	ushort mios_mdasm12ar;                   /* mdasm12 */
	ushort mios_mdasm12br;
	ushort mios_mdasm12scrd, mdasm12scr;
	ushort mios_mdasm13ar;                   /* mdasm13 */
	ushort mios_mdasm13br;
	ushort mios_mdasm13scrd, mdasm13scr;
	ushort mios_mdasm14ar;                   /* mdasm14 */
	ushort mios_mdasm14br;
	ushort mios_mdasm14scrd, mdasm14scr;
	ushort mios_mdasm15ar;                   /* mdasm15 */
	ushort mios_mdasm15br;
	ushort mios_mdasm15scrd, mdasm15scr;
	ushort mios_mpwmsm16perr;                /* mpwmsm16 */
	ushort mios_mpwmsm16pulr;
	ushort mios_mpwmsm16cntr;
	ushort mios_mpwmsm16scr;
	ushort mios_mpwmsm17perr;                /* mpwmsm17 */
	ushort mios_mpwmsm17pulr;
	ushort mios_mpwmsm17cntr;
	ushort mios_mpwmsm17scr;
	ushort mios_mpwmsm18perr;                /* mpwmsm18 */
	ushort mios_mpwmsm18pulr;
	ushort mios_mpwmsm18cntr;
	ushort mios_mpwmsm18scr;
	ushort mios_mpwmsm19perr;                /* mpwmsm19 */
	ushort mios_mpwmsm19pulr;
	ushort mios_mpwmsm19cntr;
	ushort mios_mpwmsm19scr;
	char res3[16];
	ushort mios_mmcsm22cnt;                  /* mmcsm22 */
	ushort mios_mmcsm22mlr;
	ushort mios_mmcsm22scrd, mmcsm22scr;
	char res4[32];
	ushort mios_mdasm27ar;                   /* mdasm27 */
	ushort mios_mdasm27br;
	ushort mios_mdasm27scrd, mdasm27scr;
	ushort mios_mdasm28ar;                   /*mdasm28 */
	ushort mios_mdasm28br;
	ushort mios_mdasm28scrd, mdasm28scr;
	ushort mios_mdasm29ar;                   /* mdasm29 */
	ushort mios_mdasm29br;
	ushort mios_mdasm29scrd, mdasm29scr;
	ushort mios_mdasm30ar;                   /* mdasm30 */
	ushort mios_mdasm30br;
	ushort mios_mdasm30scrd, mdasm30scr;
	ushort mios_mdasm31ar;                   /* mdasm31 */
	ushort mios_mdasm31br;
	ushort mios_mdasm31scrd, mdasm31scr;
	ushort mios_mpiosm32dr;
	ushort mios_mpiosm32ddr;
	char res5[1788];
	ushort mios_mios1tpcr;
	char mios_res13[2];
	ushort mios_mios1vnr;
	ushort mios_mios1mcr;
	char res6[12];
	ushort mios_res42z;
	ushort mios_mcpsmscr;
	char res7[1000];
	ushort mios_mios1sr0;
	char res12[2];
	ushort mios_mios1er0;
	ushort mios_mios1rpr0;
	char res8[40];
	ushort mios_mios1lvl0;
	char res9[14];
	ushort mios_mios1sr1;
	char res10[2];
	ushort mios_mios1er1;
	ushort mios_mios1rpr1;
	char res11[40];
	ushort mios_mios1lvl1;
	char res13[1038];
} mios5xx_t;

/* Toucan Module
*/
typedef struct tcan {
	ushort tcan_tcnmcr;
	ushort tcan_cantcr;
	ushort tcan_canicr;
	u_char tcan_canctrl0;
	u_char tcan_canctrl1;
	u_char tcan_presdiv;
	u_char tcan_canctrl2;
	ushort tcan_timer;
	char res1[4];
	ushort tcan_rxgmskhi;
	ushort tcan_rxgmsklo;
	ushort tcan_rx14mskhi;
	ushort tcan_rx14msklo;
	ushort tcan_rx15mskhi;
	ushort tcan_rx15msklo;
	char res2[4];
	ushort tcan_estat;
	ushort tcan_imask;
	ushort tcan_iflag;
	u_char tcan_rxectr;
	u_char tcan_txectr;
	char res3[88];
	struct {
	       ushort scr;
	       ushort id_high;
	       ushort id_low;
	       u_char data[8];
		   char res4[2];
	    } tcan_mbuff[16];
	    char res5[640];
} tcan5xx_t;

/* UIMB
*/
typedef struct uimb {
	uint uimb_umcr;
	char res1[12];
	uint uimb_utstcreg;
	char res2[12];
	uint uimb_uipend;
} uimb5xx_t;


/* Internal Memory Map MPC555
*/
typedef struct immap {
	char               res1[262144];	/* CMF Flash A 256 Kbytes */
	char               res2[196608];	/* CMF Flash B 192 Kbytes */
	char               res3[2670592];	/* Reserved for Flash */
	sysconf5xx_t       im_siu_conf;		/* SIU Configuration */
	memctl5xx_t	   im_memctl;		/* Memory Controller */
	sit5xx_t           im_sit;		/* System Integration Timers */
	car5xx_t	   im_clkrst;		/* Clocks and Reset */
	sitk5xx_t          im_sitk;		/* System Integration Timer Keys*/
	cark8xx_t          im_clkrstk;		/* Clocks and Resert Keys */
	fl5xx_t	           im_fla;	        /* Flash Module A */
	fl5xx_t	           im_flb;	        /* Flash Module B */
	char               res4[14208];		/* Reserved for SIU */
	dprc5xx_t	   im_dprc;		/* Dpram Control Register */
	char               res5[8180];		/* Reserved */
	char               dptram[6144];	/* Dptram */
	char               res6[2048];		/* Reserved */
	tpu5xx_t	   im_tpua;		/* Time Proessing Unit A */
	tpu5xx_t	   im_tpub;		/* Time Processing Unit B */
	qadc5xx_t	   im_qadca;		/* QADC A */
	qadc5xx_t	   im_qadcb;		/* QADC B */
	qsmcm5xx_t	   im_qsmcm;		/* SCI and SPI */
	mios5xx_t	   im_mios;		/* MIOS */
	tcan5xx_t          im_tcana;		/* Toucan A */
	tcan5xx_t          im_tcanb;		/* Toucan B */
	char               res7[1792];		/* Reserved */
	uimb5xx_t          im_uimb;	        /* UIMB */
} immap_t;

#endif /* __IMMAP_5XX__ */