blob: 71f35a5174280fc8fb1fe1b7271a156efd42fc43 [file] [log] [blame]
wdenk7539dea2003-06-19 23:01:32 +00001/*
2 * (C) Copyright 2003
3 * David Müller ELSOFT AG Switzerland. d.mueller@elsoft.ch
4 *
5 * See file CREDITS for list of people who contributed to this
6 * project.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21 * MA 02111-1307 USA
22 */
23
24/************************************************
25 * NAME : s3c24x0.h
26 * Version : 31.3.2003
27 *
28 * common stuff for SAMSUNG S3C24X0 SoC
29 ************************************************/
30
31#ifndef __S3C24X0_H__
32#define __S3C24X0_H__
33
34typedef volatile u8 S3C24X0_REG8;
35typedef volatile u16 S3C24X0_REG16;
36typedef volatile u32 S3C24X0_REG32;
37
38/* Memory controller (see manual chapter 5) */
39typedef struct {
40 S3C24X0_REG32 BWSCON;
41 S3C24X0_REG32 BANKCON[8];
42 S3C24X0_REG32 REFRESH;
43 S3C24X0_REG32 BANKSIZE;
44 S3C24X0_REG32 MRSRB6;
45 S3C24X0_REG32 MRSRB7;
46} /*__attribute__((__packed__))*/ S3C24X0_MEMCTL;
47
48
49/* USB HOST (see manual chapter 12) */
50typedef struct {
51 S3C24X0_REG32 HcRevision;
52 S3C24X0_REG32 HcControl;
53 S3C24X0_REG32 HcCommonStatus;
54 S3C24X0_REG32 HcInterruptStatus;
55 S3C24X0_REG32 HcInterruptEnable;
56 S3C24X0_REG32 HcInterruptDisable;
57 S3C24X0_REG32 HcHCCA;
58 S3C24X0_REG32 HcPeriodCuttendED;
59 S3C24X0_REG32 HcControlHeadED;
60 S3C24X0_REG32 HcControlCurrentED;
61 S3C24X0_REG32 HcBulkHeadED;
62 S3C24X0_REG32 HcBuldCurrentED;
63 S3C24X0_REG32 HcDoneHead;
64 S3C24X0_REG32 HcRmInterval;
65 S3C24X0_REG32 HcFmRemaining;
66 S3C24X0_REG32 HcFmNumber;
67 S3C24X0_REG32 HcPeriodicStart;
68 S3C24X0_REG32 HcLSThreshold;
69 S3C24X0_REG32 HcRhDescriptorA;
70 S3C24X0_REG32 HcRhDescriptorB;
71 S3C24X0_REG32 HcRhStatus;
72 S3C24X0_REG32 HcRhPortStatus1;
73 S3C24X0_REG32 HcRhPortStatus2;
74} /*__attribute__((__packed__))*/ S3C24X0_USB_HOST;
75
76
77/* INTERRUPT (see manual chapter 14) */
78typedef struct {
79 S3C24X0_REG32 SRCPND;
80 S3C24X0_REG32 INTMOD;
81 S3C24X0_REG32 INTMSK;
82 S3C24X0_REG32 PRIORITY;
83 S3C24X0_REG32 INTPND;
84 S3C24X0_REG32 INTOFFSET;
85#ifdef CONFIG_S3C2410
86 S3C24X0_REG32 SUBSRCPND;
87 S3C24X0_REG32 INTSUBMSK;
88#endif
89} /*__attribute__((__packed__))*/ S3C24X0_INTERRUPT;
90
91
92/* DMAS (see manual chapter 8) */
93typedef struct {
94 S3C24X0_REG32 DISRC;
95#ifdef CONFIG_S3C2410
96 S3C24X0_REG32 DISRCC;
97#endif
98 S3C24X0_REG32 DIDST;
99#ifdef CONFIG_S3C2410
100 S3C24X0_REG32 DIDSTC;
101#endif
102 S3C24X0_REG32 DCON;
103 S3C24X0_REG32 DSTAT;
104 S3C24X0_REG32 DCSRC;
105 S3C24X0_REG32 DCDST;
106 S3C24X0_REG32 DMASKTRIG;
107#ifdef CONFIG_S3C2400
108 S3C24X0_REG32 res[1];
109#endif
110#ifdef CONFIG_S3C2410
111 S3C24X0_REG32 res[7];
112#endif
113} /*__attribute__((__packed__))*/ S3C24X0_DMA;
114
115typedef struct {
116 S3C24X0_DMA dma[4];
117} /*__attribute__((__packed__))*/ S3C24X0_DMAS;
118
119
120/* CLOCK & POWER MANAGEMENT (see S3C2400 manual chapter 6) */
121/* (see S3C2410 manual chapter 7) */
122typedef struct {
123 S3C24X0_REG32 LOCKTIME;
124 S3C24X0_REG32 MPLLCON;
125 S3C24X0_REG32 UPLLCON;
126 S3C24X0_REG32 CLKCON;
127 S3C24X0_REG32 CLKSLOW;
128 S3C24X0_REG32 CLKDIVN;
129} /*__attribute__((__packed__))*/ S3C24X0_CLOCK_POWER;
130
131
132/* LCD CONTROLLER (see manual chapter 15) */
133typedef struct {
134 S3C24X0_REG32 LCDCON1;
135 S3C24X0_REG32 LCDCON2;
136 S3C24X0_REG32 LCDCON3;
137 S3C24X0_REG32 LCDCON4;
138 S3C24X0_REG32 LCDCON5;
139 S3C24X0_REG32 LCDSADDR1;
140 S3C24X0_REG32 LCDSADDR2;
141 S3C24X0_REG32 LCDSADDR3;
142 S3C24X0_REG32 REDLUT;
143 S3C24X0_REG32 GREENLUT;
144 S3C24X0_REG32 BLUELUT;
145 S3C24X0_REG32 res[8];
146 S3C24X0_REG32 DITHMODE;
147 S3C24X0_REG32 TPAL;
148#ifdef CONFIG_S3C2410
149 S3C24X0_REG32 LCDINTPND;
150 S3C24X0_REG32 LCDSRCPND;
151 S3C24X0_REG32 LCDINTMSK;
152 S3C24X0_REG32 LPCSEL;
153#endif
154} /*__attribute__((__packed__))*/ S3C24X0_LCD;
155
156
157/* NAND FLASH (see S3C2410 manual chapter 6) */
158typedef struct {
159 S3C24X0_REG32 NFCONF;
160 S3C24X0_REG32 NFCMD;
161 S3C24X0_REG32 NFADDR;
162 S3C24X0_REG32 NFDATA;
163 S3C24X0_REG32 NFSTAT;
164 S3C24X0_REG32 NFECC;
165} /*__attribute__((__packed__))*/ S3C2410_NAND;
166
167
168/* UART (see manual chapter 11) */
169typedef struct {
170 S3C24X0_REG32 ULCON;
171 S3C24X0_REG32 UCON;
172 S3C24X0_REG32 UFCON;
173 S3C24X0_REG32 UMCON;
174 S3C24X0_REG32 UTRSTAT;
175 S3C24X0_REG32 UERSTAT;
176 S3C24X0_REG32 UFSTAT;
177 S3C24X0_REG32 UMSTAT;
178#ifdef __BIG_ENDIAN
179 S3C24X0_REG8 res1[3];
180 S3C24X0_REG8 UTXH;
181 S3C24X0_REG8 res2[3];
182 S3C24X0_REG8 URXH;
183#else /* Little Endian */
184 S3C24X0_REG8 UTXH;
185 S3C24X0_REG8 res1[3];
186 S3C24X0_REG8 URXH;
187 S3C24X0_REG8 res2[3];
188#endif
189 S3C24X0_REG32 UBRDIV;
190} /*__attribute__((__packed__))*/ S3C24X0_UART;
191
192
193/* PWM TIMER (see manual chapter 10) */
194typedef struct {
195 S3C24X0_REG32 TCNTB;
196 S3C24X0_REG32 TCMPB;
197 S3C24X0_REG32 TCNTO;
198} /*__attribute__((__packed__))*/ S3C24X0_TIMER;
199
200typedef struct {
201 S3C24X0_REG32 TCFG0;
202 S3C24X0_REG32 TCFG1;
203 S3C24X0_REG32 TCON;
204 S3C24X0_TIMER ch[4];
205 S3C24X0_REG32 TCNTB4;
206 S3C24X0_REG32 TCNTO4;
207} /*__attribute__((__packed__))*/ S3C24X0_TIMERS;
208
209
210/* USB DEVICE (see manual chapter 13) */
211typedef struct {
212#ifdef __BIG_ENDIAN
213 S3C24X0_REG8 res[3];
214 S3C24X0_REG8 EP_FIFO_REG;
215#else /* little endian */
216 S3C24X0_REG8 EP_FIFO_REG;
217 S3C24X0_REG8 res[3];
218#endif
219} /*__attribute__((__packed__))*/ S3C24X0_USB_DEV_FIFOS;
220
221typedef struct {
222#ifdef __BIG_ENDIAN
223 S3C24X0_REG8 res1[3];
224 S3C24X0_REG8 EP_DMA_CON;
225 S3C24X0_REG8 res2[3];
226 S3C24X0_REG8 EP_DMA_UNIT;
227 S3C24X0_REG8 res3[3];
228 S3C24X0_REG8 EP_DMA_FIFO;
229 S3C24X0_REG8 res4[3];
230 S3C24X0_REG8 EP_DMA_TTC_L;
231 S3C24X0_REG8 res5[3];
232 S3C24X0_REG8 EP_DMA_TTC_M;
233 S3C24X0_REG8 res6[3];
234 S3C24X0_REG8 EP_DMA_TTC_H;
235#else /* little endian */
236 S3C24X0_REG8 EP_DMA_CON;
237 S3C24X0_REG8 res1[3];
238 S3C24X0_REG8 EP_DMA_UNIT;
239 S3C24X0_REG8 res2[3];
240 S3C24X0_REG8 EP_DMA_FIFO;
241 S3C24X0_REG8 res3[3];
242 S3C24X0_REG8 EP_DMA_TTC_L;
243 S3C24X0_REG8 res4[3];
244 S3C24X0_REG8 EP_DMA_TTC_M;
245 S3C24X0_REG8 res5[3];
246 S3C24X0_REG8 EP_DMA_TTC_H;
247 S3C24X0_REG8 res6[3];
248#endif
249} /*__attribute__((__packed__))*/ S3C24X0_USB_DEV_DMAS;
250
251typedef struct {
252#ifdef __BIG_ENDIAN
253 S3C24X0_REG8 res1[3];
254 S3C24X0_REG8 FUNC_ADDR_REG;
255 S3C24X0_REG8 res2[3];
256 S3C24X0_REG8 PWR_REG;
257 S3C24X0_REG8 res3[3];
258 S3C24X0_REG8 EP_INT_REG;
259 S3C24X0_REG8 res4[15];
260 S3C24X0_REG8 USB_INT_REG;
261 S3C24X0_REG8 res5[3];
262 S3C24X0_REG8 EP_INT_EN_REG;
263 S3C24X0_REG8 res6[15];
264 S3C24X0_REG8 USB_INT_EN_REG;
265 S3C24X0_REG8 res7[3];
266 S3C24X0_REG8 FRAME_NUM1_REG;
267 S3C24X0_REG8 res8[3];
268 S3C24X0_REG8 FRAME_NUM2_REG;
269 S3C24X0_REG8 res9[3];
270 S3C24X0_REG8 INDEX_REG;
271 S3C24X0_REG8 res10[7];
272 S3C24X0_REG8 MAXP_REG;
273 S3C24X0_REG8 res11[3];
274 S3C24X0_REG8 EP0_CSR_IN_CSR1_REG;
275 S3C24X0_REG8 res12[3];
276 S3C24X0_REG8 IN_CSR2_REG;
277 S3C24X0_REG8 res13[7];
278 S3C24X0_REG8 OUT_CSR1_REG;
279 S3C24X0_REG8 res14[3];
280 S3C24X0_REG8 OUT_CSR2_REG;
281 S3C24X0_REG8 res15[3];
282 S3C24X0_REG8 OUT_FIFO_CNT1_REG;
283 S3C24X0_REG8 res16[3];
284 S3C24X0_REG8 OUT_FIFO_CNT2_REG;
285#else /* little endian */
286 S3C24X0_REG8 FUNC_ADDR_REG;
287 S3C24X0_REG8 res1[3];
288 S3C24X0_REG8 PWR_REG;
289 S3C24X0_REG8 res2[3];
290 S3C24X0_REG8 EP_INT_REG;
291 S3C24X0_REG8 res3[15];
292 S3C24X0_REG8 USB_INT_REG;
293 S3C24X0_REG8 res4[3];
294 S3C24X0_REG8 EP_INT_EN_REG;
295 S3C24X0_REG8 res5[15];
296 S3C24X0_REG8 USB_INT_EN_REG;
297 S3C24X0_REG8 res6[3];
298 S3C24X0_REG8 FRAME_NUM1_REG;
299 S3C24X0_REG8 res7[3];
300 S3C24X0_REG8 FRAME_NUM2_REG;
301 S3C24X0_REG8 res8[3];
302 S3C24X0_REG8 INDEX_REG;
303 S3C24X0_REG8 res9[7];
304 S3C24X0_REG8 MAXP_REG;
305 S3C24X0_REG8 res10[7];
306 S3C24X0_REG8 EP0_CSR_IN_CSR1_REG;
307 S3C24X0_REG8 res11[3];
308 S3C24X0_REG8 IN_CSR2_REG;
309 S3C24X0_REG8 res12[3];
310 S3C24X0_REG8 OUT_CSR1_REG;
311 S3C24X0_REG8 res13[7];
312 S3C24X0_REG8 OUT_CSR2_REG;
313 S3C24X0_REG8 res14[3];
314 S3C24X0_REG8 OUT_FIFO_CNT1_REG;
315 S3C24X0_REG8 res15[3];
316 S3C24X0_REG8 OUT_FIFO_CNT2_REG;
317 S3C24X0_REG8 res16[3];
318#endif /* __BIG_ENDIAN */
319 S3C24X0_USB_DEV_FIFOS fifo[5];
320 S3C24X0_USB_DEV_DMAS dma[5];
321} /*__attribute__((__packed__))*/ S3C24X0_USB_DEVICE;
322
323
324/* WATCH DOG TIMER (see manual chapter 18) */
325typedef struct {
326 S3C24X0_REG32 WTCON;
327 S3C24X0_REG32 WTDAT;
328 S3C24X0_REG32 WTCNT;
329} /*__attribute__((__packed__))*/ S3C24X0_WATCHDOG;
330
331
332/* IIC (see manual chapter 20) */
333typedef struct {
334 S3C24X0_REG32 IICCON;
335 S3C24X0_REG32 IICSTAT;
336 S3C24X0_REG32 IICADD;
337 S3C24X0_REG32 IICDS;
338} /*__attribute__((__packed__))*/ S3C24X0_I2C;
339
340
341/* IIS (see manual chapter 21) */
342typedef struct {
343#ifdef __BIG_ENDIAN
344 S3C24X0_REG16 res1;
345 S3C24X0_REG16 IISCON;
346 S3C24X0_REG16 res2;
347 S3C24X0_REG16 IISMOD;
348 S3C24X0_REG16 res3;
349 S3C24X0_REG16 IISPSR;
350 S3C24X0_REG16 res4;
351 S3C24X0_REG16 IISFCON;
352 S3C24X0_REG16 res5;
353 S3C24X0_REG16 IISFIFO;
354#else /* little endian */
355 S3C24X0_REG16 IISCON;
356 S3C24X0_REG16 res1;
357 S3C24X0_REG16 IISMOD;
358 S3C24X0_REG16 res2;
359 S3C24X0_REG16 IISPSR;
360 S3C24X0_REG16 res3;
361 S3C24X0_REG16 IISFCON;
362 S3C24X0_REG16 res4;
363 S3C24X0_REG16 IISFIFO;
364 S3C24X0_REG16 res5;
365#endif
366} /*__attribute__((__packed__))*/ S3C24X0_I2S;
367
368
369/* I/O PORT (see manual chapter 9) */
370typedef struct {
371#ifdef CONFIG_S3C2400
372 S3C24X0_REG32 PACON;
373 S3C24X0_REG32 PADAT;
wdenk57b2d802003-06-27 21:31:46 +0000374
wdenk7539dea2003-06-19 23:01:32 +0000375 S3C24X0_REG32 PBCON;
376 S3C24X0_REG32 PBDAT;
377 S3C24X0_REG32 PBUP;
378
379 S3C24X0_REG32 PCCON;
380 S3C24X0_REG32 PCDAT;
381 S3C24X0_REG32 PCUP;
382
383 S3C24X0_REG32 PDCON;
384 S3C24X0_REG32 PDDAT;
385 S3C24X0_REG32 PDUP;
386
387 S3C24X0_REG32 PECON;
388 S3C24X0_REG32 PEDAT;
389 S3C24X0_REG32 PEUP;
390
391 S3C24X0_REG32 PFCON;
392 S3C24X0_REG32 PFDAT;
393 S3C24X0_REG32 PFUP;
394
395 S3C24X0_REG32 PGCON;
396 S3C24X0_REG32 PGDAT;
397 S3C24X0_REG32 PGUP;
398
399 S3C24X0_REG32 OPENCR;
400
401 S3C24X0_REG32 MISCCR;
402 S3C24X0_REG32 EXTINT;
403#endif
404#ifdef CONFIG_S3C2410
405 S3C24X0_REG32 GPACON;
406 S3C24X0_REG32 GPADAT;
407 S3C24X0_REG32 res1[2];
408 S3C24X0_REG32 GPBCON;
409 S3C24X0_REG32 GPBDAT;
410 S3C24X0_REG32 GPBUP;
411 S3C24X0_REG32 res2;
412 S3C24X0_REG32 GPCCON;
413 S3C24X0_REG32 GPCDAT;
414 S3C24X0_REG32 GPCUP;
415 S3C24X0_REG32 res3;
416 S3C24X0_REG32 GPDCON;
417 S3C24X0_REG32 GPDDAT;
418 S3C24X0_REG32 GPDUP;
419 S3C24X0_REG32 res4;
420 S3C24X0_REG32 GPECON;
421 S3C24X0_REG32 GPEDAT;
422 S3C24X0_REG32 GPEUP;
423 S3C24X0_REG32 res5;
424 S3C24X0_REG32 GPFCON;
425 S3C24X0_REG32 GPFDAT;
426 S3C24X0_REG32 GPFUP;
427 S3C24X0_REG32 res6;
428 S3C24X0_REG32 GPGCON;
429 S3C24X0_REG32 GPGDAT;
430 S3C24X0_REG32 GPGUP;
431 S3C24X0_REG32 res7;
432 S3C24X0_REG32 GPHCON;
433 S3C24X0_REG32 GPHDAT;
434 S3C24X0_REG32 GPHUP;
435 S3C24X0_REG32 res8;
436
437 S3C24X0_REG32 MISCCR;
438 S3C24X0_REG32 DCLKCON;
439 S3C24X0_REG32 EXTINT0;
440 S3C24X0_REG32 EXTINT1;
441 S3C24X0_REG32 EXTINT2;
442 S3C24X0_REG32 EINTFLT0;
443 S3C24X0_REG32 EINTFLT1;
444 S3C24X0_REG32 EINTFLT2;
445 S3C24X0_REG32 EINTFLT3;
446 S3C24X0_REG32 EINTMASK;
447 S3C24X0_REG32 EINTPEND;
448 S3C24X0_REG32 GSTATUS0;
449 S3C24X0_REG32 GSTATUS1;
450 S3C24X0_REG32 GSTATUS2;
451 S3C24X0_REG32 GSTATUS3;
452 S3C24X0_REG32 GSTATUS4;
453#endif
454} /*__attribute__((__packed__))*/ S3C24X0_GPIO;
455
456
457/* RTC (see manual chapter 17) */
458typedef struct {
459#ifdef __BIG_ENDIAN
460 S3C24X0_REG8 res1[67];
461 S3C24X0_REG8 RTCCON;
462 S3C24X0_REG8 res2[3];
463 S3C24X0_REG8 TICNT;
464 S3C24X0_REG8 res3[11];
465 S3C24X0_REG8 RTCALM;
466 S3C24X0_REG8 res4[3];
467 S3C24X0_REG8 ALMSEC;
468 S3C24X0_REG8 res5[3];
469 S3C24X0_REG8 ALMMIN;
470 S3C24X0_REG8 res6[3];
471 S3C24X0_REG8 ALMHOUR;
472 S3C24X0_REG8 res7[3];
473 S3C24X0_REG8 ALMDATE;
474 S3C24X0_REG8 res8[3];
475 S3C24X0_REG8 ALMMON;
476 S3C24X0_REG8 res9[3];
477 S3C24X0_REG8 ALMYEAR;
478 S3C24X0_REG8 res10[3];
479 S3C24X0_REG8 RTCRST;
480 S3C24X0_REG8 res11[3];
481 S3C24X0_REG8 BCDSEC;
482 S3C24X0_REG8 res12[3];
483 S3C24X0_REG8 BCDMIN;
484 S3C24X0_REG8 res13[3];
485 S3C24X0_REG8 BCDHOUR;
486 S3C24X0_REG8 res14[3];
487 S3C24X0_REG8 BCDDATE;
488 S3C24X0_REG8 res15[3];
489 S3C24X0_REG8 BCDDAY;
490 S3C24X0_REG8 res16[3];
491 S3C24X0_REG8 BCDMON;
492 S3C24X0_REG8 res17[3];
493 S3C24X0_REG8 BCDYEAR;
494#else /* little endian */
495 S3C24X0_REG8 res0[64];
496 S3C24X0_REG8 RTCCON;
497 S3C24X0_REG8 res1[3];
498 S3C24X0_REG8 TICNT;
499 S3C24X0_REG8 res2[11];
500 S3C24X0_REG8 RTCALM;
501 S3C24X0_REG8 res3[3];
502 S3C24X0_REG8 ALMSEC;
503 S3C24X0_REG8 res4[3];
504 S3C24X0_REG8 ALMMIN;
505 S3C24X0_REG8 res5[3];
506 S3C24X0_REG8 ALMHOUR;
507 S3C24X0_REG8 res6[3];
508 S3C24X0_REG8 ALMDATE;
509 S3C24X0_REG8 res7[3];
510 S3C24X0_REG8 ALMMON;
511 S3C24X0_REG8 res8[3];
512 S3C24X0_REG8 ALMYEAR;
513 S3C24X0_REG8 res9[3];
514 S3C24X0_REG8 RTCRST;
515 S3C24X0_REG8 res10[3];
516 S3C24X0_REG8 BCDSEC;
517 S3C24X0_REG8 res11[3];
518 S3C24X0_REG8 BCDMIN;
519 S3C24X0_REG8 res12[3];
520 S3C24X0_REG8 BCDHOUR;
521 S3C24X0_REG8 res13[3];
522 S3C24X0_REG8 BCDDATE;
523 S3C24X0_REG8 res14[3];
524 S3C24X0_REG8 BCDDAY;
525 S3C24X0_REG8 res15[3];
526 S3C24X0_REG8 BCDMON;
527 S3C24X0_REG8 res16[3];
528 S3C24X0_REG8 BCDYEAR;
529 S3C24X0_REG8 res17[3];
530#endif
531} /*__attribute__((__packed__))*/ S3C24X0_RTC;
532
533
534/* ADC (see manual chapter 16) */
535typedef struct {
536 S3C24X0_REG32 ADCCON;
537 S3C24X0_REG32 ADCDAT;
538} /*__attribute__((__packed__))*/ S3C2400_ADC;
539
540
541/* ADC (see manual chapter 16) */
542typedef struct {
543 S3C24X0_REG32 ADCCON;
544 S3C24X0_REG32 ADCTSC;
545 S3C24X0_REG32 ADCDLY;
546 S3C24X0_REG32 ADCDAT0;
547 S3C24X0_REG32 ADCDAT1;
548} /*__attribute__((__packed__))*/ S3C2410_ADC;
549
550
551/* SPI (see manual chapter 22) */
552typedef struct {
553 S3C24X0_REG32 SPCON;
554 S3C24X0_REG32 SPSTA;
555 S3C24X0_REG32 SPPIN;
556 S3C24X0_REG32 SPPRE;
557 S3C24X0_REG32 SPTDAT;
558 S3C24X0_REG32 SPRDAT;
559 S3C24X0_REG32 res[2];
560} __attribute__((__packed__)) S3C24X0_SPI_CHANNEL;
561
562typedef struct {
563 S3C24X0_SPI_CHANNEL ch[S3C24X0_SPI_CHANNELS];
564} /*__attribute__((__packed__))*/ S3C24X0_SPI;
565
566
567/* MMC INTERFACE (see S3C2400 manual chapter 19) */
568typedef struct {
569#ifdef __BIG_ENDIAN
570 S3C24X0_REG8 res1[3];
571 S3C24X0_REG8 MMCON;
572 S3C24X0_REG8 res2[3];
573 S3C24X0_REG8 MMCRR;
574 S3C24X0_REG8 res3[3];
575 S3C24X0_REG8 MMFCON;
576 S3C24X0_REG8 res4[3];
577 S3C24X0_REG8 MMSTA;
578 S3C24X0_REG16 res5;
579 S3C24X0_REG16 MMFSTA;
580 S3C24X0_REG8 res6[3];
581 S3C24X0_REG8 MMPRE;
582 S3C24X0_REG16 res7;
583 S3C24X0_REG16 MMLEN;
584 S3C24X0_REG8 res8[3];
585 S3C24X0_REG8 MMCR7;
586 S3C24X0_REG32 MMRSP[4];
587 S3C24X0_REG8 res9[3];
588 S3C24X0_REG8 MMCMD0;
589 S3C24X0_REG32 MMCMD1;
590 S3C24X0_REG16 res10;
591 S3C24X0_REG16 MMCR16;
592 S3C24X0_REG8 res11[3];
593 S3C24X0_REG8 MMDAT;
594#else
595 S3C24X0_REG8 MMCON;
596 S3C24X0_REG8 res1[3];
597 S3C24X0_REG8 MMCRR;
598 S3C24X0_REG8 res2[3];
599 S3C24X0_REG8 MMFCON;
600 S3C24X0_REG8 res3[3];
601 S3C24X0_REG8 MMSTA;
602 S3C24X0_REG8 res4[3];
603 S3C24X0_REG16 MMFSTA;
604 S3C24X0_REG16 res5;
605 S3C24X0_REG8 MMPRE;
606 S3C24X0_REG8 res6[3];
607 S3C24X0_REG16 MMLEN;
608 S3C24X0_REG16 res7;
609 S3C24X0_REG8 MMCR7;
610 S3C24X0_REG8 res8[3];
611 S3C24X0_REG32 MMRSP[4];
612 S3C24X0_REG8 MMCMD0;
613 S3C24X0_REG8 res9[3];
614 S3C24X0_REG32 MMCMD1;
615 S3C24X0_REG16 MMCR16;
616 S3C24X0_REG16 res10;
617 S3C24X0_REG8 MMDAT;
618 S3C24X0_REG8 res11[3];
619#endif
620} /*__attribute__((__packed__))*/ S3C2400_MMC;
621
622
623/* SD INTERFACE (see S3C2410 manual chapter 19) */
624typedef struct {
625 S3C24X0_REG32 SDICON;
626 S3C24X0_REG32 SDIPRE;
627 S3C24X0_REG32 SDICARG;
628 S3C24X0_REG32 SDICCON;
629 S3C24X0_REG32 SDICSTA;
630 S3C24X0_REG32 SDIRSP0;
631 S3C24X0_REG32 SDIRSP1;
632 S3C24X0_REG32 SDIRSP2;
633 S3C24X0_REG32 SDIRSP3;
634 S3C24X0_REG32 SDIDTIMER;
635 S3C24X0_REG32 SDIBSIZE;
636 S3C24X0_REG32 SDIDCON;
637 S3C24X0_REG32 SDIDCNT;
638 S3C24X0_REG32 SDIDSTA;
639 S3C24X0_REG32 SDIFSTA;
640#ifdef __BIG_ENDIAN
641 S3C24X0_REG8 res[3];
642 S3C24X0_REG8 SDIDAT;
643#else
644 S3C24X0_REG8 SDIDAT;
645 S3C24X0_REG8 res[3];
646#endif
647 S3C24X0_REG32 SDIIMSK;
648} /*__attribute__((__packed__))*/ S3C2410_SDI;
649
650
651#if 0
652/* Memory control */
653#define rBWSCON (*(volatile unsigned *)0x48000000)
654#define rBANKCON0 (*(volatile unsigned *)0x48000004)
655#define rBANKCON1 (*(volatile unsigned *)0x48000008)
656#define rBANKCON2 (*(volatile unsigned *)0x4800000C)
657#define rBANKCON3 (*(volatile unsigned *)0x48000010)
658#define rBANKCON4 (*(volatile unsigned *)0x48000014)
659#define rBANKCON5 (*(volatile unsigned *)0x48000018)
660#define rBANKCON6 (*(volatile unsigned *)0x4800001C)
661#define rBANKCON7 (*(volatile unsigned *)0x48000020)
662#define rREFRESH (*(volatile unsigned *)0x48000024)
663#define rBANKSIZE (*(volatile unsigned *)0x48000028)
664#define rMRSRB6 (*(volatile unsigned *)0x4800002C)
665#define rMRSRB7 (*(volatile unsigned *)0x48000030)
666
667
668/* USB HOST */
669#define rHcRevision (*(volatile unsigned *)0x49000000)
670#define rHcControl (*(volatile unsigned *)0x49000004)
671#define rHcCommonStatus (*(volatile unsigned *)0x49000008)
672#define rHcInterruptStatus (*(volatile unsigned *)0x4900000C)
673#define rHcInterruptEnable (*(volatile unsigned *)0x49000010)
674#define rHcInterruptDisable (*(volatile unsigned *)0x49000014)
675#define rHcHCCA (*(volatile unsigned *)0x49000018)
676#define rHcPeriodCuttendED (*(volatile unsigned *)0x4900001C)
677#define rHcControlHeadED (*(volatile unsigned *)0x49000020)
678#define rHcControlCurrentED (*(volatile unsigned *)0x49000024)
679#define rHcBulkHeadED (*(volatile unsigned *)0x49000028)
680#define rHcBuldCurrentED (*(volatile unsigned *)0x4900002C)
681#define rHcDoneHead (*(volatile unsigned *)0x49000030)
682#define rHcRmInterval (*(volatile unsigned *)0x49000034)
683#define rHcFmRemaining (*(volatile unsigned *)0x49000038)
684#define rHcFmNumber (*(volatile unsigned *)0x4900003C)
685#define rHcPeriodicStart (*(volatile unsigned *)0x49000040)
686#define rHcLSThreshold (*(volatile unsigned *)0x49000044)
687#define rHcRhDescriptorA (*(volatile unsigned *)0x49000048)
688#define rHcRhDescriptorB (*(volatile unsigned *)0x4900004C)
689#define rHcRhStatus (*(volatile unsigned *)0x49000050)
690#define rHcRhPortStatus1 (*(volatile unsigned *)0x49000054)
691#define rHcRhPortStatus2 (*(volatile unsigned *)0x49000058)
692
693
694/* INTERRUPT */
695#define rSRCPND (*(volatile unsigned *)0x4A000000)
696#define rINTMOD (*(volatile unsigned *)0x4A000004)
697#define rINTMSK (*(volatile unsigned *)0x4A000008)
698#define rPRIORITY (*(volatile unsigned *)0x4A00000C)
699#define rINTPND (*(volatile unsigned *)0x4A000010)
700#define rINTOFFSET (*(volatile unsigned *)0x4A000014)
701#define rSUBSRCPND (*(volatile unsigned *)0x4A000018)
702#define rINTSUBMSK (*(volatile unsigned *)0x4A00001C)
703
704
705/* DMA */
706#define rDISRC0 (*(volatile unsigned *)0x4B000000)
707#define rDISRCC0 (*(volatile unsigned *)0x4B000004)
708#define rDIDST0 (*(volatile unsigned *)0x4B000008)
709#define rDIDSTC0 (*(volatile unsigned *)0x4B00000C)
710#define rDCON0 (*(volatile unsigned *)0x4B000010)
711#define rDSTAT0 (*(volatile unsigned *)0x4B000014)
712#define rDCSRC0 (*(volatile unsigned *)0x4B000018)
713#define rDCDST0 (*(volatile unsigned *)0x4B00001C)
714#define rDMASKTRIG0 (*(volatile unsigned *)0x4B000020)
715#define rDISRC1 (*(volatile unsigned *)0x4B000040)
716#define rDISRCC1 (*(volatile unsigned *)0x4B000044)
717#define rDIDST1 (*(volatile unsigned *)0x4B000048)
718#define rDIDSTC1 (*(volatile unsigned *)0x4B00004C)
719#define rDCON1 (*(volatile unsigned *)0x4B000050)
720#define rDSTAT1 (*(volatile unsigned *)0x4B000054)
721#define rDCSRC1 (*(volatile unsigned *)0x4B000058)
722#define rDCDST1 (*(volatile unsigned *)0x4B00005C)
723#define rDMASKTRIG1 (*(volatile unsigned *)0x4B000060)
724#define rDISRC2 (*(volatile unsigned *)0x4B000080)
725#define rDISRCC2 (*(volatile unsigned *)0x4B000084)
726#define rDIDST2 (*(volatile unsigned *)0x4B000088)
727#define rDIDSTC2 (*(volatile unsigned *)0x4B00008C)
728#define rDCON2 (*(volatile unsigned *)0x4B000090)
729#define rDSTAT2 (*(volatile unsigned *)0x4B000094)
730#define rDCSRC2 (*(volatile unsigned *)0x4B000098)
731#define rDCDST2 (*(volatile unsigned *)0x4B00009C)
732#define rDMASKTRIG2 (*(volatile unsigned *)0x4B0000A0)
733#define rDISRC3 (*(volatile unsigned *)0x4B0000C0)
734#define rDISRCC3 (*(volatile unsigned *)0x4B0000C4)
735#define rDIDST3 (*(volatile unsigned *)0x4B0000C8)
736#define rDIDSTC3 (*(volatile unsigned *)0x4B0000CC)
737#define rDCON3 (*(volatile unsigned *)0x4B0000D0)
738#define rDSTAT3 (*(volatile unsigned *)0x4B0000D4)
739#define rDCSRC3 (*(volatile unsigned *)0x4B0000D8)
740#define rDCDST3 (*(volatile unsigned *)0x4B0000DC)
741#define rDMASKTRIG3 (*(volatile unsigned *)0x4B0000E0)
742
743
744/* CLOCK & POWER MANAGEMENT */
745#define rLOCKTIME (*(volatile unsigned *)0x4C000000)
746#define rMPLLCON (*(volatile unsigned *)0x4C000004)
747#define rUPLLCON (*(volatile unsigned *)0x4C000008)
748#define rCLKCON (*(volatile unsigned *)0x4C00000C)
749#define rCLKSLOW (*(volatile unsigned *)0x4C000010)
750#define rCLKDIVN (*(volatile unsigned *)0x4C000014)
751
752
753/* LCD CONTROLLER */
754#define rLCDCON1 (*(volatile unsigned *)0x4D000000)
755#define rLCDCON2 (*(volatile unsigned *)0x4D000004)
756#define rLCDCON3 (*(volatile unsigned *)0x4D000008)
757#define rLCDCON4 (*(volatile unsigned *)0x4D00000C)
758#define rLCDCON5 (*(volatile unsigned *)0x4D000010)
759#define rLCDSADDR1 (*(volatile unsigned *)0x4D000014)
760#define rLCDSADDR2 (*(volatile unsigned *)0x4D000018)
761#define rLCDSADDR3 (*(volatile unsigned *)0x4D00001C)
762#define rREDLUT (*(volatile unsigned *)0x4D000020)
763#define rGREENLUT (*(volatile unsigned *)0x4D000024)
764#define rBLUELUT (*(volatile unsigned *)0x4D000028)
765#define rDITHMODE (*(volatile unsigned *)0x4D00004C)
766#define rTPAL (*(volatile unsigned *)0x4D000050)
767#define rLCDINTPND (*(volatile unsigned *)0x4D000054)
768#define rLCDSRCPND (*(volatile unsigned *)0x4D000058)
769#define rLCDINTMSK (*(volatile unsigned *)0x4D00005C)
770
771
772/* NAND FLASH */
773#define rNFCONF (*(volatile unsigned *)0x4E000000)
774#define rNFCMD (*(volatile unsigned *)0x4E000004)
775#define rNFADDR (*(volatile unsigned *)0x4E000008)
776#define rNFDATA (*(volatile unsigned *)0x4E00000C)
777#define rNFSTAT (*(volatile unsigned *)0x4E000010)
778#define rNFECC (*(volatile unsigned *)0x4E000014)
779
780
781/* UART */
782#define rULCON0 (*(volatile unsigned *)0x50000000)
783#define rUCON0 (*(volatile unsigned *)0x50000004)
784#define rUFCON0 (*(volatile unsigned *)0x50000008)
785#define rUMCON0 (*(volatile unsigned *)0x5000000C)
786#define rUTRSTAT0 (*(volatile unsigned *)0x50000010)
787#define rUERSTAT0 (*(volatile unsigned *)0x50000014)
788#define rUFSTAT0 (*(volatile unsigned *)0x50000018)
789#define rUMSTAT0 (*(volatile unsigned *)0x5000001C)
790#define rUBRDIV0 (*(volatile unsigned *)0x50000028)
791
792#define rULCON1 (*(volatile unsigned *)0x50004000)
793#define rUCON1 (*(volatile unsigned *)0x50004004)
794#define rUFCON1 (*(volatile unsigned *)0x50004008)
795#define rUMCON1 (*(volatile unsigned *)0x5000400C)
796#define rUTRSTAT1 (*(volatile unsigned *)0x50004010)
797#define rUERSTAT1 (*(volatile unsigned *)0x50004014)
798#define rUFSTAT1 (*(volatile unsigned *)0x50004018)
799#define rUMSTAT1 (*(volatile unsigned *)0x5000401C)
800#define rUBRDIV1 (*(volatile unsigned *)0x50004028)
801
802#define rULCON2 (*(volatile unsigned *)0x50008000)
803#define rUCON2 (*(volatile unsigned *)0x50008004)
804#define rUFCON2 (*(volatile unsigned *)0x50008008)
805#define rUTRSTAT2 (*(volatile unsigned *)0x50008010)
806#define rUERSTAT2 (*(volatile unsigned *)0x50008014)
807#define rUFSTAT2 (*(volatile unsigned *)0x50008018)
808#define rUBRDIV2 (*(volatile unsigned *)0x50008028)
809
810#ifdef __BIG_ENDIAN
811#define rUTXH0 (*(volatile unsigned char *)0x50000023)
812#define rURXH0 (*(volatile unsigned char *)0x50000027)
813#define rUTXH1 (*(volatile unsigned char *)0x50004023)
814#define rURXH1 (*(volatile unsigned char *)0x50004027)
815#define rUTXH2 (*(volatile unsigned char *)0x50008023)
816#define rURXH2 (*(volatile unsigned char *)0x50008027)
817
818#define WrUTXH0(ch) (*(volatile unsigned char *)0x50000023)=(unsigned char)(ch)
819#define RdURXH0() (*(volatile unsigned char *)0x50000027)
820#define WrUTXH1(ch) (*(volatile unsigned char *)0x50004023)=(unsigned char)(ch)
821#define RdURXH1() (*(volatile unsigned char *)0x50004027)
822#define WrUTXH2(ch) (*(volatile unsigned char *)0x50008023)=(unsigned char)(ch)
823#define RdURXH2() (*(volatile unsigned char *)0x50008027)
824
825#define UTXH0 (0x50000020+3) /* byte_access address by DMA */
826#define URXH0 (0x50000024+3)
827#define UTXH1 (0x50004020+3)
828#define URXH1 (0x50004024+3)
829#define UTXH2 (0x50008020+3)
830#define URXH2 (0x50008024+3)
831
832#else /* Little Endian */
833#define rUTXH0 (*(volatile unsigned char *)0x50000020)
834#define rURXH0 (*(volatile unsigned char *)0x50000024)
835#define rUTXH1 (*(volatile unsigned char *)0x50004020)
836#define rURXH1 (*(volatile unsigned char *)0x50004024)
837#define rUTXH2 (*(volatile unsigned char *)0x50008020)
838#define rURXH2 (*(volatile unsigned char *)0x50008024)
839
840#define WrUTXH0(ch) (*(volatile unsigned char *)0x50000020)=(unsigned char)(ch)
841#define RdURXH0() (*(volatile unsigned char *)0x50000024)
842#define WrUTXH1(ch) (*(volatile unsigned char *)0x50004020)=(unsigned char)(ch)
843#define RdURXH1() (*(volatile unsigned char *)0x50004024)
844#define WrUTXH2(ch) (*(volatile unsigned char *)0x50008020)=(unsigned char)(ch)
845#define RdURXH2() (*(volatile unsigned char *)0x50008024)
846
847#define UTXH0 (0x50000020) /* byte_access address by DMA */
848#define URXH0 (0x50000024)
849#define UTXH1 (0x50004020)
850#define URXH1 (0x50004024)
851#define UTXH2 (0x50008020)
852#define URXH2 (0x50008024)
853#endif
854
855
856/* PWM TIMER */
857#define rTCFG0 (*(volatile unsigned *)0x51000000)
858#define rTCFG1 (*(volatile unsigned *)0x51000004)
859#define rTCON (*(volatile unsigned *)0x51000008)
860#define rTCNTB0 (*(volatile unsigned *)0x5100000C)
861#define rTCMPB0 (*(volatile unsigned *)0x51000010)
862#define rTCNTO0 (*(volatile unsigned *)0x51000014)
863#define rTCNTB1 (*(volatile unsigned *)0x51000018)
864#define rTCMPB1 (*(volatile unsigned *)0x5100001C)
865#define rTCNTO1 (*(volatile unsigned *)0x51000020)
866#define rTCNTB2 (*(volatile unsigned *)0x51000024)
867#define rTCMPB2 (*(volatile unsigned *)0x51000028)
868#define rTCNTO2 (*(volatile unsigned *)0x5100002C)
869#define rTCNTB3 (*(volatile unsigned *)0x51000030)
870#define rTCMPB3 (*(volatile unsigned *)0x51000034)
871#define rTCNTO3 (*(volatile unsigned *)0x51000038)
872#define rTCNTB4 (*(volatile unsigned *)0x5100003C)
873#define rTCNTO4 (*(volatile unsigned *)0x51000040)
874
875
876/* USB DEVICE */
877#ifdef __BIG_ENDIAN
878#define rFUNC_ADDR_REG (*(volatile unsigned char *)0x52000143)
879#define rPWR_REG (*(volatile unsigned char *)0x52000147)
880#define rEP_INT_REG (*(volatile unsigned char *)0x5200014B)
881#define rUSB_INT_REG (*(volatile unsigned char *)0x5200015B)
882#define rEP_INT_EN_REG (*(volatile unsigned char *)0x5200015F)
883#define rUSB_INT_EN_REG (*(volatile unsigned char *)0x5200016F)
884#define rFRAME_NUM1_REG (*(volatile unsigned char *)0x52000173)
885#define rFRAME_NUM2_REG (*(volatile unsigned char *)0x52000177)
886#define rINDEX_REG (*(volatile unsigned char *)0x5200017B)
887#define rMAXP_REG (*(volatile unsigned char *)0x52000183)
888#define rEP0_CSR (*(volatile unsigned char *)0x52000187)
889#define rIN_CSR1_REG (*(volatile unsigned char *)0x52000187)
890#define rIN_CSR2_REG (*(volatile unsigned char *)0x5200018B)
891#define rOUT_CSR1_REG (*(volatile unsigned char *)0x52000193)
892#define rOUT_CSR2_REG (*(volatile unsigned char *)0x52000197)
893#define rOUT_FIFO_CNT1_REG (*(volatile unsigned char *)0x5200019B)
894#define rOUT_FIFO_CNT2_REG (*(volatile unsigned char *)0x5200019F)
895#define rEP0_FIFO (*(volatile unsigned char *)0x520001C3)
896#define rEP1_FIFO (*(volatile unsigned char *)0x520001C7)
897#define rEP2_FIFO (*(volatile unsigned char *)0x520001CB)
898#define rEP3_FIFO (*(volatile unsigned char *)0x520001CF)
899#define rEP4_FIFO (*(volatile unsigned char *)0x520001D3)
900#define rEP1_DMA_CON (*(volatile unsigned char *)0x52000203)
901#define rEP1_DMA_UNIT (*(volatile unsigned char *)0x52000207)
902#define rEP1_DMA_FIFO (*(volatile unsigned char *)0x5200020B)
903#define rEP1_DMA_TX_LO (*(volatile unsigned char *)0x5200020F)
904#define rEP1_DMA_TX_MD (*(volatile unsigned char *)0x52000213)
905#define rEP1_DMA_TX_HI (*(volatile unsigned char *)0x52000217)
906#define rEP2_DMA_CON (*(volatile unsigned char *)0x5200021B)
907#define rEP2_DMA_UNIT (*(volatile unsigned char *)0x5200021F)
908#define rEP2_DMA_FIFO (*(volatile unsigned char *)0x52000223)
909#define rEP2_DMA_TX_LO (*(volatile unsigned char *)0x52000227)
910#define rEP2_DMA_TX_MD (*(volatile unsigned char *)0x5200022B)
911#define rEP2_DMA_TX_HI (*(volatile unsigned char *)0x5200022F)
912#define rEP3_DMA_CON (*(volatile unsigned char *)0x52000243)
913#define rEP3_DMA_UNIT (*(volatile unsigned char *)0x52000247)
914#define rEP3_DMA_FIFO (*(volatile unsigned char *)0x5200024B)
915#define rEP3_DMA_TX_LO (*(volatile unsigned char *)0x5200024F)
916#define rEP3_DMA_TX_MD (*(volatile unsigned char *)0x52000253)
917#define rEP3_DMA_TX_HI (*(volatile unsigned char *)0x52000257)
918#define rEP4_DMA_CON (*(volatile unsigned char *)0x5200025B)
919#define rEP4_DMA_UNIT (*(volatile unsigned char *)0x5200025F)
920#define rEP4_DMA_FIFO (*(volatile unsigned char *)0x52000263)
921#define rEP4_DMA_TX_LO (*(volatile unsigned char *)0x52000267)
922#define rEP4_DMA_TX_MD (*(volatile unsigned char *)0x5200026B)
923#define rEP4_DMA_TX_HI (*(volatile unsigned char *)0x5200026F)
924#else /* little endian */
925#define rFUNC_ADDR_REG (*(volatile unsigned char *)0x52000140)
926#define rPWR_REG (*(volatile unsigned char *)0x52000144)
927#define rEP_INT_REG (*(volatile unsigned char *)0x52000148)
928#define rUSB_INT_REG (*(volatile unsigned char *)0x52000158)
929#define rEP_INT_EN_REG (*(volatile unsigned char *)0x5200015C)
930#define rUSB_INT_EN_REG (*(volatile unsigned char *)0x5200016C)
931#define rFRAME_NUM1_REG (*(volatile unsigned char *)0x52000170)
932#define rFRAME_NUM2_REG (*(volatile unsigned char *)0x52000174)
933#define rINDEX_REG (*(volatile unsigned char *)0x52000178)
934#define rMAXP_REG (*(volatile unsigned char *)0x52000180)
935#define rEP0_CSR (*(volatile unsigned char *)0x52000184)
936#define rIN_CSR1_REG (*(volatile unsigned char *)0x52000184)
937#define rIN_CSR2_REG (*(volatile unsigned char *)0x52000188)
938#define rOUT_CSR1_REG (*(volatile unsigned char *)0x52000190)
939#define rOUT_CSR2_REG (*(volatile unsigned char *)0x52000194)
940#define rOUT_FIFO_CNT1_REG (*(volatile unsigned char *)0x52000198)
941#define rOUT_FIFO_CNT2_REG (*(volatile unsigned char *)0x5200019C)
942#define rEP0_FIFO (*(volatile unsigned char *)0x520001C0)
943#define rEP1_FIFO (*(volatile unsigned char *)0x520001C4)
944#define rEP2_FIFO (*(volatile unsigned char *)0x520001C8)
945#define rEP3_FIFO (*(volatile unsigned char *)0x520001CC)
946#define rEP4_FIFO (*(volatile unsigned char *)0x520001D0)
947#define rEP1_DMA_CON (*(volatile unsigned char *)0x52000200)
948#define rEP1_DMA_UNIT (*(volatile unsigned char *)0x52000204)
949#define rEP1_DMA_FIFO (*(volatile unsigned char *)0x52000208)
950#define rEP1_DMA_TX_LO (*(volatile unsigned char *)0x5200020C)
951#define rEP1_DMA_TX_MD (*(volatile unsigned char *)0x52000210)
952#define rEP1_DMA_TX_HI (*(volatile unsigned char *)0x52000214)
953#define rEP2_DMA_CON (*(volatile unsigned char *)0x52000218)
954#define rEP2_DMA_UNIT (*(volatile unsigned char *)0x5200021C)
955#define rEP2_DMA_FIFO (*(volatile unsigned char *)0x52000220)
956#define rEP2_DMA_TX_LO (*(volatile unsigned char *)0x52000224)
957#define rEP2_DMA_TX_MD (*(volatile unsigned char *)0x52000228)
958#define rEP2_DMA_TX_HI (*(volatile unsigned char *)0x5200022C)
959#define rEP3_DMA_CON (*(volatile unsigned char *)0x52000240)
960#define rEP3_DMA_UNIT (*(volatile unsigned char *)0x52000244)
961#define rEP3_DMA_FIFO (*(volatile unsigned char *)0x52000248)
962#define rEP3_DMA_TX_LO (*(volatile unsigned char *)0x5200024C)
963#define rEP3_DMA_TX_MD (*(volatile unsigned char *)0x52000250)
964#define rEP3_DMA_TX_HI (*(volatile unsigned char *)0x52000254)
965#define rEP4_DMA_CON (*(volatile unsigned char *)0x52000258)
966#define rEP4_DMA_UNIT (*(volatile unsigned char *)0x5200025C)
967#define rEP4_DMA_FIFO (*(volatile unsigned char *)0x52000260)
968#define rEP4_DMA_TX_LO (*(volatile unsigned char *)0x52000264)
969#define rEP4_DMA_TX_MD (*(volatile unsigned char *)0x52000268)
970#define rEP4_DMA_TX_HI (*(volatile unsigned char *)0x5200026C)
971#endif /* __BIG_ENDIAN */
972
973
974/* WATCH DOG TIMER */
975#define rWTCON (*(volatile unsigned *)0x53000000)
976#define rWTDAT (*(volatile unsigned *)0x53000004)
977#define rWTCNT (*(volatile unsigned *)0x53000008)
978
979
980/* IIC */
981#define rIICCON (*(volatile unsigned *)0x54000000)
982#define rIICSTAT (*(volatile unsigned *)0x54000004)
983#define rIICADD (*(volatile unsigned *)0x54000008)
984#define rIICDS (*(volatile unsigned *)0x5400000C)
985
986
987/* IIS */
988#define rIISCON (*(volatile unsigned *)0x55000000)
989#define rIISMOD (*(volatile unsigned *)0x55000004)
990#define rIISPSR (*(volatile unsigned *)0x55000008)
991#define rIISFCON (*(volatile unsigned *)0x5500000C)
992
993#ifdef __BIG_ENDIAN
994#define IISFIF ((volatile unsigned short *)0x55000012)
995#else /* little endian */
996#define IISFIF ((volatile unsigned short *)0x55000010)
997#endif
998
999
1000/* I/O PORT */
1001#define rGPACON (*(volatile unsigned *)0x56000000)
1002#define rGPADAT (*(volatile unsigned *)0x56000004)
1003
1004#define rGPBCON (*(volatile unsigned *)0x56000010)
1005#define rGPBDAT (*(volatile unsigned *)0x56000014)
1006#define rGPBUP (*(volatile unsigned *)0x56000018)
1007
1008#define rGPCCON (*(volatile unsigned *)0x56000020)
1009#define rGPCDAT (*(volatile unsigned *)0x56000024)
1010#define rGPCUP (*(volatile unsigned *)0x56000028)
1011
1012#define rGPDCON (*(volatile unsigned *)0x56000030)
1013#define rGPDDAT (*(volatile unsigned *)0x56000034)
1014#define rGPDUP (*(volatile unsigned *)0x56000038)
1015
1016#define rGPECON (*(volatile unsigned *)0x56000040)
1017#define rGPEDAT (*(volatile unsigned *)0x56000044)
1018#define rGPEUP (*(volatile unsigned *)0x56000048)
1019
1020#define rGPFCON (*(volatile unsigned *)0x56000050)
1021#define rGPFDAT (*(volatile unsigned *)0x56000054)
1022#define rGPFUP (*(volatile unsigned *)0x56000058)
1023
1024#define rGPGCON (*(volatile unsigned *)0x56000060)
1025#define rGPGDAT (*(volatile unsigned *)0x56000064)
1026#define rGPGUP (*(volatile unsigned *)0x56000068)
1027
1028#define rGPHCON (*(volatile unsigned *)0x56000070)
1029#define rGPHDAT (*(volatile unsigned *)0x56000074)
1030#define rGPHUP (*(volatile unsigned *)0x56000078)
1031
1032#define rMISCCR (*(volatile unsigned *)0x56000080)
1033#define rDCLKCON (*(volatile unsigned *)0x56000084)
1034#define rEXTINT0 (*(volatile unsigned *)0x56000088)
1035#define rEXTINT1 (*(volatile unsigned *)0x5600008C)
1036#define rEXTINT2 (*(volatile unsigned *)0x56000090)
1037#define rEINTFLT0 (*(volatile unsigned *)0x56000094)
1038#define rEINTFLT1 (*(volatile unsigned *)0x56000098)
1039#define rEINTFLT2 (*(volatile unsigned *)0x5600009C)
1040#define rEINTFLT3 (*(volatile unsigned *)0x560000A0)
1041#define rEINTMASK (*(volatile unsigned *)0x560000A4)
1042#define rEINTPEND (*(volatile unsigned *)0x560000A8)
1043#define rGSTATUS0 (*(volatile unsigned *)0x560000AC)
1044#define rGSTATUS1 (*(volatile unsigned *)0x560000B0)
1045
1046
1047/* RTC */
1048#ifdef __BIG_ENDIAN
1049#define rRTCCON (*(volatile unsigned char *)0x57000043)
1050#define rTICNT (*(volatile unsigned char *)0x57000047)
1051#define rRTCALM (*(volatile unsigned char *)0x57000053)
1052#define rALMSEC (*(volatile unsigned char *)0x57000057)
1053#define rALMMIN (*(volatile unsigned char *)0x5700005B)
1054#define rALMHOUR (*(volatile unsigned char *)0x5700005F)
1055#define rALMDATE (*(volatile unsigned char *)0x57000063)
1056#define rALMMON (*(volatile unsigned char *)0x57000067)
1057#define rALMYEAR (*(volatile unsigned char *)0x5700006B)
1058#define rRTCRST (*(volatile unsigned char *)0x5700006F)
1059#define rBCDSEC (*(volatile unsigned char *)0x57000073)
1060#define rBCDMIN (*(volatile unsigned char *)0x57000077)
1061#define rBCDHOUR (*(volatile unsigned char *)0x5700007B)
1062#define rBCDDATE (*(volatile unsigned char *)0x5700007F)
1063#define rBCDDAY (*(volatile unsigned char *)0x57000083)
1064#define rBCDMON (*(volatile unsigned char *)0x57000087)
1065#define rBCDYEAR (*(volatile unsigned char *)0x5700008B)
1066#else /* little endian */
1067#define rRTCCON (*(volatile unsigned char *)0x57000040)
1068#define rTICNT (*(volatile unsigned char *)0x57000044)
1069#define rRTCALM (*(volatile unsigned char *)0x57000050)
1070#define rALMSEC (*(volatile unsigned char *)0x57000054)
1071#define rALMMIN (*(volatile unsigned char *)0x57000058)
1072#define rALMHOUR (*(volatile unsigned char *)0x5700005C)
1073#define rALMDATE (*(volatile unsigned char *)0x57000060)
1074#define rALMMON (*(volatile unsigned char *)0x57000064)
1075#define rALMYEAR (*(volatile unsigned char *)0x57000068)
1076#define rRTCRST (*(volatile unsigned char *)0x5700006C)
1077#define rBCDSEC (*(volatile unsigned char *)0x57000070)
1078#define rBCDMIN (*(volatile unsigned char *)0x57000074)
1079#define rBCDHOUR (*(volatile unsigned char *)0x57000078)
1080#define rBCDDATE (*(volatile unsigned char *)0x5700007C)
1081#define rBCDDAY (*(volatile unsigned char *)0x57000080)
1082#define rBCDMON (*(volatile unsigned char *)0x57000084)
1083#define rBCDYEAR (*(volatile unsigned char *)0x57000088)
1084#endif
1085
1086
1087/* ADC */
1088#define rADCCON (*(volatile unsigned *)0x58000000)
1089#define rADCTSC (*(volatile unsigned *)0x58000004)
1090#define rADCDLY (*(volatile unsigned *)0x58000008)
1091#define rADCDAT0 (*(volatile unsigned *)0x5800000C)
1092#define rADCDAT1 (*(volatile unsigned *)0x58000010)
1093
1094
1095/* SPI */
1096#define rSPCON0 (*(volatile unsigned *)0x59000000)
1097#define rSPSTA0 (*(volatile unsigned *)0x59000004)
1098#define rSPPIN0 (*(volatile unsigned *)0x59000008)
1099#define rSPPRE0 (*(volatile unsigned *)0x5900000C)
1100#define rSPTDAT0 (*(volatile unsigned *)0x59000010)
1101#define rSPRDAT0 (*(volatile unsigned *)0x59000014)
1102#define rSPCON1 (*(volatile unsigned *)0x59000020)
1103#define rSPSTA1 (*(volatile unsigned *)0x59000024)
1104#define rSPPIN1 (*(volatile unsigned *)0x59000028)
1105#define rSPPRE1 (*(volatile unsigned *)0x5900002C)
1106#define rSPTDAT1 (*(volatile unsigned *)0x59000030)
1107#define rSPRDAT1 (*(volatile unsigned *)0x59000034)
1108
1109
1110/* SD INTERFACE */
1111#define rSDICON (*(volatile unsigned *)0x5A000000)
1112#define rSDIPRE (*(volatile unsigned *)0x5A000004)
1113#define rSDICmdArg (*(volatile unsigned *)0x5A000008)
1114#define rSDICmdCon (*(volatile unsigned *)0x5A00000C)
1115#define rSDICmdSta (*(volatile unsigned *)0x5A000010)
1116#define rSDIRSP0 (*(volatile unsigned *)0x5A000014)
1117#define rSDIRSP1 (*(volatile unsigned *)0x5A000018)
1118#define rSDIRSP2 (*(volatile unsigned *)0x5A00001C)
1119#define rSDIRSP3 (*(volatile unsigned *)0x5A000020)
1120#define rSDIDTimer (*(volatile unsigned *)0x5A000024)
1121#define rSDIBSize (*(volatile unsigned *)0x5A000028)
1122#define rSDIDatCon (*(volatile unsigned *)0x5A00002C)
1123#define rSDIDatCnt (*(volatile unsigned *)0x5A000030)
1124#define rSDIDatSta (*(volatile unsigned *)0x5A000034)
1125#define rSDIFSTA (*(volatile unsigned *)0x5A000038)
1126#ifdef __BIG_ENDIAN
1127#define rSDIDAT (*(volatile unsigned char *)0x5A00003F)
1128#else
1129#define rSDIDAT (*(volatile unsigned char *)0x5A00003C)
1130#endif
1131#define rSDIIntMsk (*(volatile unsigned *)0x5A000040)
1132
1133#endif
1134
1135#endif /*__S3C24X0_H__*/