blob: 15f53dd35bee3baeb48f59a11f300e7a648745c1 [file] [log] [blame]
wdenk48b42612003-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
wdenk48b42612003-06-19 23:01:32 +000034/* Memory controller (see manual chapter 5) */
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +090035struct s3c24x0_memctl {
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +090036 u32 BWSCON;
37 u32 BANKCON[8];
38 u32 REFRESH;
39 u32 BANKSIZE;
40 u32 MRSRB6;
41 u32 MRSRB7;
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +090042};
wdenk48b42612003-06-19 23:01:32 +000043
44
45/* USB HOST (see manual chapter 12) */
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +090046struct s3c24x0_usb_host {
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +090047 u32 HcRevision;
48 u32 HcControl;
49 u32 HcCommonStatus;
50 u32 HcInterruptStatus;
51 u32 HcInterruptEnable;
52 u32 HcInterruptDisable;
53 u32 HcHCCA;
54 u32 HcPeriodCuttendED;
55 u32 HcControlHeadED;
56 u32 HcControlCurrentED;
57 u32 HcBulkHeadED;
58 u32 HcBuldCurrentED;
59 u32 HcDoneHead;
60 u32 HcRmInterval;
61 u32 HcFmRemaining;
62 u32 HcFmNumber;
63 u32 HcPeriodicStart;
64 u32 HcLSThreshold;
65 u32 HcRhDescriptorA;
66 u32 HcRhDescriptorB;
67 u32 HcRhStatus;
68 u32 HcRhPortStatus1;
69 u32 HcRhPortStatus2;
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +090070};
wdenk48b42612003-06-19 23:01:32 +000071
72
73/* INTERRUPT (see manual chapter 14) */
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +090074struct s3c24x0_interrupt {
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +090075 u32 SRCPND;
76 u32 INTMOD;
77 u32 INTMSK;
78 u32 PRIORITY;
79 u32 INTPND;
80 u32 INTOFFSET;
wdenk48b42612003-06-19 23:01:32 +000081#ifdef CONFIG_S3C2410
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +090082 u32 SUBSRCPND;
83 u32 INTSUBMSK;
wdenk48b42612003-06-19 23:01:32 +000084#endif
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +090085};
wdenk48b42612003-06-19 23:01:32 +000086
87
88/* DMAS (see manual chapter 8) */
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +090089struct s3c24x0_dma {
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +090090 u32 DISRC;
wdenk48b42612003-06-19 23:01:32 +000091#ifdef CONFIG_S3C2410
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +090092 u32 DISRCC;
wdenk48b42612003-06-19 23:01:32 +000093#endif
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +090094 u32 DIDST;
wdenk48b42612003-06-19 23:01:32 +000095#ifdef CONFIG_S3C2410
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +090096 u32 DIDSTC;
wdenk48b42612003-06-19 23:01:32 +000097#endif
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +090098 u32 DCON;
99 u32 DSTAT;
100 u32 DCSRC;
101 u32 DCDST;
102 u32 DMASKTRIG;
wdenk48b42612003-06-19 23:01:32 +0000103#ifdef CONFIG_S3C2400
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900104 u32 res[1];
wdenk48b42612003-06-19 23:01:32 +0000105#endif
106#ifdef CONFIG_S3C2410
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900107 u32 res[7];
wdenk48b42612003-06-19 23:01:32 +0000108#endif
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900109};
wdenk48b42612003-06-19 23:01:32 +0000110
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900111struct s3c24x0_dmas {
112 struct s3c24x0_dma dma[4];
113};
wdenk48b42612003-06-19 23:01:32 +0000114
115
116/* CLOCK & POWER MANAGEMENT (see S3C2400 manual chapter 6) */
117/* (see S3C2410 manual chapter 7) */
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900118struct s3c24x0_clock_power {
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900119 u32 LOCKTIME;
120 u32 MPLLCON;
121 u32 UPLLCON;
122 u32 CLKCON;
123 u32 CLKSLOW;
124 u32 CLKDIVN;
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900125};
wdenk48b42612003-06-19 23:01:32 +0000126
127
128/* LCD CONTROLLER (see manual chapter 15) */
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900129struct s3c24x0_lcd {
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900130 u32 LCDCON1;
131 u32 LCDCON2;
132 u32 LCDCON3;
133 u32 LCDCON4;
134 u32 LCDCON5;
135 u32 LCDSADDR1;
136 u32 LCDSADDR2;
137 u32 LCDSADDR3;
138 u32 REDLUT;
139 u32 GREENLUT;
140 u32 BLUELUT;
141 u32 res[8];
142 u32 DITHMODE;
143 u32 TPAL;
wdenk48b42612003-06-19 23:01:32 +0000144#ifdef CONFIG_S3C2410
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900145 u32 LCDINTPND;
146 u32 LCDSRCPND;
147 u32 LCDINTMSK;
148 u32 LPCSEL;
wdenk48b42612003-06-19 23:01:32 +0000149#endif
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900150};
wdenk48b42612003-06-19 23:01:32 +0000151
152
153/* NAND FLASH (see S3C2410 manual chapter 6) */
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900154struct s3c2410_nand {
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900155 u32 NFCONF;
156 u32 NFCMD;
157 u32 NFADDR;
158 u32 NFDATA;
159 u32 NFSTAT;
160 u32 NFECC;
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900161};
wdenk48b42612003-06-19 23:01:32 +0000162
163
164/* UART (see manual chapter 11) */
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900165struct s3c24x0_uart {
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900166 u32 ULCON;
167 u32 UCON;
168 u32 UFCON;
169 u32 UMCON;
170 u32 UTRSTAT;
171 u32 UERSTAT;
172 u32 UFSTAT;
173 u32 UMSTAT;
wdenk48b42612003-06-19 23:01:32 +0000174#ifdef __BIG_ENDIAN
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900175 u8 res1[3];
176 u8 UTXH;
177 u8 res2[3];
178 u8 URXH;
wdenk48b42612003-06-19 23:01:32 +0000179#else /* Little Endian */
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900180 u8 UTXH;
181 u8 res1[3];
182 u8 URXH;
183 u8 res2[3];
wdenk48b42612003-06-19 23:01:32 +0000184#endif
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900185 u32 UBRDIV;
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900186};
wdenk48b42612003-06-19 23:01:32 +0000187
188
189/* PWM TIMER (see manual chapter 10) */
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900190struct s3c24x0_timer {
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900191 u32 TCNTB;
192 u32 TCMPB;
193 u32 TCNTO;
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900194};
wdenk48b42612003-06-19 23:01:32 +0000195
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900196struct s3c24x0_timers {
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900197 u32 TCFG0;
198 u32 TCFG1;
199 u32 TCON;
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900200 struct s3c24x0_timer ch[4];
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900201 u32 TCNTB4;
202 u32 TCNTO4;
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900203};
wdenk48b42612003-06-19 23:01:32 +0000204
205
206/* USB DEVICE (see manual chapter 13) */
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900207struct s3c24x0_usb_dev_fifos {
wdenk48b42612003-06-19 23:01:32 +0000208#ifdef __BIG_ENDIAN
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900209 u8 res[3];
210 u8 EP_FIFO_REG;
wdenk48b42612003-06-19 23:01:32 +0000211#else /* little endian */
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900212 u8 EP_FIFO_REG;
213 u8 res[3];
wdenk48b42612003-06-19 23:01:32 +0000214#endif
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900215};
wdenk48b42612003-06-19 23:01:32 +0000216
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900217struct s3c24x0_usb_dev_dmas {
wdenk48b42612003-06-19 23:01:32 +0000218#ifdef __BIG_ENDIAN
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900219 u8 res1[3];
220 u8 EP_DMA_CON;
221 u8 res2[3];
222 u8 EP_DMA_UNIT;
223 u8 res3[3];
224 u8 EP_DMA_FIFO;
225 u8 res4[3];
226 u8 EP_DMA_TTC_L;
227 u8 res5[3];
228 u8 EP_DMA_TTC_M;
229 u8 res6[3];
230 u8 EP_DMA_TTC_H;
wdenk48b42612003-06-19 23:01:32 +0000231#else /* little endian */
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900232 u8 EP_DMA_CON;
233 u8 res1[3];
234 u8 EP_DMA_UNIT;
235 u8 res2[3];
236 u8 EP_DMA_FIFO;
237 u8 res3[3];
238 u8 EP_DMA_TTC_L;
239 u8 res4[3];
240 u8 EP_DMA_TTC_M;
241 u8 res5[3];
242 u8 EP_DMA_TTC_H;
243 u8 res6[3];
wdenk48b42612003-06-19 23:01:32 +0000244#endif
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900245};
wdenk48b42612003-06-19 23:01:32 +0000246
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900247struct s3c24x0_usb_device {
wdenk48b42612003-06-19 23:01:32 +0000248#ifdef __BIG_ENDIAN
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900249 u8 res1[3];
250 u8 FUNC_ADDR_REG;
251 u8 res2[3];
252 u8 PWR_REG;
253 u8 res3[3];
254 u8 EP_INT_REG;
255 u8 res4[15];
256 u8 USB_INT_REG;
257 u8 res5[3];
258 u8 EP_INT_EN_REG;
259 u8 res6[15];
260 u8 USB_INT_EN_REG;
261 u8 res7[3];
262 u8 FRAME_NUM1_REG;
263 u8 res8[3];
264 u8 FRAME_NUM2_REG;
265 u8 res9[3];
266 u8 INDEX_REG;
267 u8 res10[7];
268 u8 MAXP_REG;
269 u8 res11[3];
270 u8 EP0_CSR_IN_CSR1_REG;
271 u8 res12[3];
272 u8 IN_CSR2_REG;
273 u8 res13[7];
274 u8 OUT_CSR1_REG;
275 u8 res14[3];
276 u8 OUT_CSR2_REG;
277 u8 res15[3];
278 u8 OUT_FIFO_CNT1_REG;
279 u8 res16[3];
280 u8 OUT_FIFO_CNT2_REG;
wdenk48b42612003-06-19 23:01:32 +0000281#else /* little endian */
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900282 u8 FUNC_ADDR_REG;
283 u8 res1[3];
284 u8 PWR_REG;
285 u8 res2[3];
286 u8 EP_INT_REG;
287 u8 res3[15];
288 u8 USB_INT_REG;
289 u8 res4[3];
290 u8 EP_INT_EN_REG;
291 u8 res5[15];
292 u8 USB_INT_EN_REG;
293 u8 res6[3];
294 u8 FRAME_NUM1_REG;
295 u8 res7[3];
296 u8 FRAME_NUM2_REG;
297 u8 res8[3];
298 u8 INDEX_REG;
299 u8 res9[7];
300 u8 MAXP_REG;
301 u8 res10[7];
302 u8 EP0_CSR_IN_CSR1_REG;
303 u8 res11[3];
304 u8 IN_CSR2_REG;
305 u8 res12[3];
306 u8 OUT_CSR1_REG;
307 u8 res13[7];
308 u8 OUT_CSR2_REG;
309 u8 res14[3];
310 u8 OUT_FIFO_CNT1_REG;
311 u8 res15[3];
312 u8 OUT_FIFO_CNT2_REG;
313 u8 res16[3];
wdenk48b42612003-06-19 23:01:32 +0000314#endif /* __BIG_ENDIAN */
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900315 struct s3c24x0_usb_dev_fifos fifo[5];
316 struct s3c24x0_usb_dev_dmas dma[5];
317};
wdenk48b42612003-06-19 23:01:32 +0000318
319
320/* WATCH DOG TIMER (see manual chapter 18) */
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900321struct s3c24x0_watchdog {
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900322 u32 WTCON;
323 u32 WTDAT;
324 u32 WTCNT;
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900325};
wdenk48b42612003-06-19 23:01:32 +0000326
327
328/* IIC (see manual chapter 20) */
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900329struct s3c24x0_i2c {
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900330 u32 IICCON;
331 u32 IICSTAT;
332 u32 IICADD;
333 u32 IICDS;
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900334};
wdenk48b42612003-06-19 23:01:32 +0000335
336
337/* IIS (see manual chapter 21) */
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900338struct s3c24x0_i2s {
wdenk48b42612003-06-19 23:01:32 +0000339#ifdef __BIG_ENDIAN
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900340 u16 res1;
341 u16 IISCON;
342 u16 res2;
343 u16 IISMOD;
344 u16 res3;
345 u16 IISPSR;
346 u16 res4;
347 u16 IISFCON;
348 u16 res5;
349 u16 IISFIFO;
wdenk48b42612003-06-19 23:01:32 +0000350#else /* little endian */
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900351 u16 IISCON;
352 u16 res1;
353 u16 IISMOD;
354 u16 res2;
355 u16 IISPSR;
356 u16 res3;
357 u16 IISFCON;
358 u16 res4;
359 u16 IISFIFO;
360 u16 res5;
wdenk48b42612003-06-19 23:01:32 +0000361#endif
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900362};
wdenk48b42612003-06-19 23:01:32 +0000363
364
365/* I/O PORT (see manual chapter 9) */
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900366struct s3c24x0_gpio {
wdenk48b42612003-06-19 23:01:32 +0000367#ifdef CONFIG_S3C2400
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900368 u32 PACON;
369 u32 PADAT;
wdenk8bde7f72003-06-27 21:31:46 +0000370
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900371 u32 PBCON;
372 u32 PBDAT;
373 u32 PBUP;
wdenk48b42612003-06-19 23:01:32 +0000374
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900375 u32 PCCON;
376 u32 PCDAT;
377 u32 PCUP;
wdenk48b42612003-06-19 23:01:32 +0000378
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900379 u32 PDCON;
380 u32 PDDAT;
381 u32 PDUP;
wdenk48b42612003-06-19 23:01:32 +0000382
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900383 u32 PECON;
384 u32 PEDAT;
385 u32 PEUP;
wdenk48b42612003-06-19 23:01:32 +0000386
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900387 u32 PFCON;
388 u32 PFDAT;
389 u32 PFUP;
wdenk48b42612003-06-19 23:01:32 +0000390
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900391 u32 PGCON;
392 u32 PGDAT;
393 u32 PGUP;
wdenk48b42612003-06-19 23:01:32 +0000394
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900395 u32 OPENCR;
wdenk48b42612003-06-19 23:01:32 +0000396
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900397 u32 MISCCR;
398 u32 EXTINT;
wdenk48b42612003-06-19 23:01:32 +0000399#endif
400#ifdef CONFIG_S3C2410
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900401 u32 GPACON;
402 u32 GPADAT;
403 u32 res1[2];
404 u32 GPBCON;
405 u32 GPBDAT;
406 u32 GPBUP;
407 u32 res2;
408 u32 GPCCON;
409 u32 GPCDAT;
410 u32 GPCUP;
411 u32 res3;
412 u32 GPDCON;
413 u32 GPDDAT;
414 u32 GPDUP;
415 u32 res4;
416 u32 GPECON;
417 u32 GPEDAT;
418 u32 GPEUP;
419 u32 res5;
420 u32 GPFCON;
421 u32 GPFDAT;
422 u32 GPFUP;
423 u32 res6;
424 u32 GPGCON;
425 u32 GPGDAT;
426 u32 GPGUP;
427 u32 res7;
428 u32 GPHCON;
429 u32 GPHDAT;
430 u32 GPHUP;
431 u32 res8;
wdenk48b42612003-06-19 23:01:32 +0000432
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900433 u32 MISCCR;
434 u32 DCLKCON;
435 u32 EXTINT0;
436 u32 EXTINT1;
437 u32 EXTINT2;
438 u32 EINTFLT0;
439 u32 EINTFLT1;
440 u32 EINTFLT2;
441 u32 EINTFLT3;
442 u32 EINTMASK;
443 u32 EINTPEND;
444 u32 GSTATUS0;
445 u32 GSTATUS1;
446 u32 GSTATUS2;
447 u32 GSTATUS3;
448 u32 GSTATUS4;
wdenk48b42612003-06-19 23:01:32 +0000449#endif
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900450};
wdenk48b42612003-06-19 23:01:32 +0000451
452
453/* RTC (see manual chapter 17) */
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900454struct s3c24x0_rtc {
wdenk48b42612003-06-19 23:01:32 +0000455#ifdef __BIG_ENDIAN
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900456 u8 res1[67];
457 u8 RTCCON;
458 u8 res2[3];
459 u8 TICNT;
460 u8 res3[11];
461 u8 RTCALM;
462 u8 res4[3];
463 u8 ALMSEC;
464 u8 res5[3];
465 u8 ALMMIN;
466 u8 res6[3];
467 u8 ALMHOUR;
468 u8 res7[3];
469 u8 ALMDATE;
470 u8 res8[3];
471 u8 ALMMON;
472 u8 res9[3];
473 u8 ALMYEAR;
474 u8 res10[3];
475 u8 RTCRST;
476 u8 res11[3];
477 u8 BCDSEC;
478 u8 res12[3];
479 u8 BCDMIN;
480 u8 res13[3];
481 u8 BCDHOUR;
482 u8 res14[3];
483 u8 BCDDATE;
484 u8 res15[3];
485 u8 BCDDAY;
486 u8 res16[3];
487 u8 BCDMON;
488 u8 res17[3];
489 u8 BCDYEAR;
wdenk48b42612003-06-19 23:01:32 +0000490#else /* little endian */
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900491 u8 res0[64];
492 u8 RTCCON;
493 u8 res1[3];
494 u8 TICNT;
495 u8 res2[11];
496 u8 RTCALM;
497 u8 res3[3];
498 u8 ALMSEC;
499 u8 res4[3];
500 u8 ALMMIN;
501 u8 res5[3];
502 u8 ALMHOUR;
503 u8 res6[3];
504 u8 ALMDATE;
505 u8 res7[3];
506 u8 ALMMON;
507 u8 res8[3];
508 u8 ALMYEAR;
509 u8 res9[3];
510 u8 RTCRST;
511 u8 res10[3];
512 u8 BCDSEC;
513 u8 res11[3];
514 u8 BCDMIN;
515 u8 res12[3];
516 u8 BCDHOUR;
517 u8 res13[3];
518 u8 BCDDATE;
519 u8 res14[3];
520 u8 BCDDAY;
521 u8 res15[3];
522 u8 BCDMON;
523 u8 res16[3];
524 u8 BCDYEAR;
525 u8 res17[3];
wdenk48b42612003-06-19 23:01:32 +0000526#endif
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900527};
wdenk48b42612003-06-19 23:01:32 +0000528
529
530/* ADC (see manual chapter 16) */
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900531struct s3c2400_adc {
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900532 u32 ADCCON;
533 u32 ADCDAT;
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900534};
wdenk48b42612003-06-19 23:01:32 +0000535
536
537/* ADC (see manual chapter 16) */
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900538struct s3c2410_adc {
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900539 u32 ADCCON;
540 u32 ADCTSC;
541 u32 ADCDLY;
542 u32 ADCDAT0;
543 u32 ADCDAT1;
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900544};
wdenk48b42612003-06-19 23:01:32 +0000545
546
547/* SPI (see manual chapter 22) */
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900548struct s3c24x0_spi_channel {
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900549 u8 SPCON;
550 u8 res1[3];
551 u8 SPSTA;
552 u8 res2[3];
553 u8 SPPIN;
554 u8 res3[3];
555 u8 SPPRE;
556 u8 res4[3];
557 u8 SPTDAT;
558 u8 res5[3];
559 u8 SPRDAT;
560 u8 res6[3];
561 u8 res7[16];
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900562};
wdenk48b42612003-06-19 23:01:32 +0000563
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900564struct s3c24x0_spi {
565 struct s3c24x0_spi_channel ch[S3C24X0_SPI_CHANNELS];
566};
wdenk48b42612003-06-19 23:01:32 +0000567
568
569/* MMC INTERFACE (see S3C2400 manual chapter 19) */
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900570struct s3c2400_mmc {
wdenk48b42612003-06-19 23:01:32 +0000571#ifdef __BIG_ENDIAN
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900572 u8 res1[3];
573 u8 MMCON;
574 u8 res2[3];
575 u8 MMCRR;
576 u8 res3[3];
577 u8 MMFCON;
578 u8 res4[3];
579 u8 MMSTA;
580 u16 res5;
581 u16 MMFSTA;
582 u8 res6[3];
583 u8 MMPRE;
584 u16 res7;
585 u16 MMLEN;
586 u8 res8[3];
587 u8 MMCR7;
588 u32 MMRSP[4];
589 u8 res9[3];
590 u8 MMCMD0;
591 u32 MMCMD1;
592 u16 res10;
593 u16 MMCR16;
594 u8 res11[3];
595 u8 MMDAT;
wdenk48b42612003-06-19 23:01:32 +0000596#else
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900597 u8 MMCON;
598 u8 res1[3];
599 u8 MMCRR;
600 u8 res2[3];
601 u8 MMFCON;
602 u8 res3[3];
603 u8 MMSTA;
604 u8 res4[3];
605 u16 MMFSTA;
606 u16 res5;
607 u8 MMPRE;
608 u8 res6[3];
609 u16 MMLEN;
610 u16 res7;
611 u8 MMCR7;
612 u8 res8[3];
613 u32 MMRSP[4];
614 u8 MMCMD0;
615 u8 res9[3];
616 u32 MMCMD1;
617 u16 MMCR16;
618 u16 res10;
619 u8 MMDAT;
620 u8 res11[3];
wdenk48b42612003-06-19 23:01:32 +0000621#endif
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900622};
wdenk48b42612003-06-19 23:01:32 +0000623
624
625/* SD INTERFACE (see S3C2410 manual chapter 19) */
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900626struct s3c2410_sdi {
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900627 u32 SDICON;
628 u32 SDIPRE;
629 u32 SDICARG;
630 u32 SDICCON;
631 u32 SDICSTA;
632 u32 SDIRSP0;
633 u32 SDIRSP1;
634 u32 SDIRSP2;
635 u32 SDIRSP3;
636 u32 SDIDTIMER;
637 u32 SDIBSIZE;
638 u32 SDIDCON;
639 u32 SDIDCNT;
640 u32 SDIDSTA;
641 u32 SDIFSTA;
wdenk48b42612003-06-19 23:01:32 +0000642#ifdef __BIG_ENDIAN
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900643 u8 res[3];
644 u8 SDIDAT;
wdenk48b42612003-06-19 23:01:32 +0000645#else
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900646 u8 SDIDAT;
647 u8 res[3];
wdenk48b42612003-06-19 23:01:32 +0000648#endif
kevin.morfitt@fearnside-systems.co.uk9ebfdc22009-11-04 17:49:31 +0900649 u32 SDIIMSK;
kevin.morfitt@fearnside-systems.co.uk8250d0b2009-10-10 13:32:01 +0900650};
wdenk48b42612003-06-19 23:01:32 +0000651
652#endif /*__S3C24X0_H__*/