wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 1 | /* |
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 | |||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 34 | /* Memory controller (see manual chapter 5) */ |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 35 | struct s3c24x0_memctl { |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 36 | u32 BWSCON; |
37 | u32 BANKCON[8]; | ||||
38 | u32 REFRESH; | ||||
39 | u32 BANKSIZE; | ||||
40 | u32 MRSRB6; | ||||
41 | u32 MRSRB7; | ||||
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 42 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 43 | |
44 | |||||
45 | /* USB HOST (see manual chapter 12) */ | ||||
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 46 | struct s3c24x0_usb_host { |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 47 | 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.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 70 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 71 | |
72 | |||||
73 | /* INTERRUPT (see manual chapter 14) */ | ||||
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 74 | struct s3c24x0_interrupt { |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 75 | u32 SRCPND; |
76 | u32 INTMOD; | ||||
77 | u32 INTMSK; | ||||
78 | u32 PRIORITY; | ||||
79 | u32 INTPND; | ||||
80 | u32 INTOFFSET; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 81 | #ifdef CONFIG_S3C2410 |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 82 | u32 SUBSRCPND; |
83 | u32 INTSUBMSK; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 84 | #endif |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 85 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 86 | |
87 | |||||
88 | /* DMAS (see manual chapter 8) */ | ||||
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 89 | struct s3c24x0_dma { |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 90 | u32 DISRC; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 91 | #ifdef CONFIG_S3C2410 |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 92 | u32 DISRCC; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 93 | #endif |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 94 | u32 DIDST; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 95 | #ifdef CONFIG_S3C2410 |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 96 | u32 DIDSTC; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 97 | #endif |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 98 | u32 DCON; |
99 | u32 DSTAT; | ||||
100 | u32 DCSRC; | ||||
101 | u32 DCDST; | ||||
102 | u32 DMASKTRIG; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 103 | #ifdef CONFIG_S3C2400 |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 104 | u32 res[1]; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 105 | #endif |
106 | #ifdef CONFIG_S3C2410 | ||||
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 107 | u32 res[7]; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 108 | #endif |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 109 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 110 | |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 111 | struct s3c24x0_dmas { |
112 | struct s3c24x0_dma dma[4]; | ||||
113 | }; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 114 | |
115 | |||||
116 | /* CLOCK & POWER MANAGEMENT (see S3C2400 manual chapter 6) */ | ||||
117 | /* (see S3C2410 manual chapter 7) */ | ||||
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 118 | struct s3c24x0_clock_power { |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 119 | u32 LOCKTIME; |
120 | u32 MPLLCON; | ||||
121 | u32 UPLLCON; | ||||
122 | u32 CLKCON; | ||||
123 | u32 CLKSLOW; | ||||
124 | u32 CLKDIVN; | ||||
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 125 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 126 | |
127 | |||||
128 | /* LCD CONTROLLER (see manual chapter 15) */ | ||||
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 129 | struct s3c24x0_lcd { |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 130 | 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; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 144 | #ifdef CONFIG_S3C2410 |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 145 | u32 LCDINTPND; |
146 | u32 LCDSRCPND; | ||||
147 | u32 LCDINTMSK; | ||||
148 | u32 LPCSEL; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 149 | #endif |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 150 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 151 | |
152 | |||||
153 | /* NAND FLASH (see S3C2410 manual chapter 6) */ | ||||
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 154 | struct s3c2410_nand { |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 155 | u32 NFCONF; |
156 | u32 NFCMD; | ||||
157 | u32 NFADDR; | ||||
158 | u32 NFDATA; | ||||
159 | u32 NFSTAT; | ||||
160 | u32 NFECC; | ||||
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 161 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 162 | |
163 | |||||
164 | /* UART (see manual chapter 11) */ | ||||
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 165 | struct s3c24x0_uart { |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 166 | u32 ULCON; |
167 | u32 UCON; | ||||
168 | u32 UFCON; | ||||
169 | u32 UMCON; | ||||
170 | u32 UTRSTAT; | ||||
171 | u32 UERSTAT; | ||||
172 | u32 UFSTAT; | ||||
173 | u32 UMSTAT; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 174 | #ifdef __BIG_ENDIAN |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 175 | u8 res1[3]; |
176 | u8 UTXH; | ||||
177 | u8 res2[3]; | ||||
178 | u8 URXH; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 179 | #else /* Little Endian */ |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 180 | u8 UTXH; |
181 | u8 res1[3]; | ||||
182 | u8 URXH; | ||||
183 | u8 res2[3]; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 184 | #endif |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 185 | u32 UBRDIV; |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 186 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 187 | |
188 | |||||
189 | /* PWM TIMER (see manual chapter 10) */ | ||||
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 190 | struct s3c24x0_timer { |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 191 | u32 TCNTB; |
192 | u32 TCMPB; | ||||
193 | u32 TCNTO; | ||||
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 194 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 195 | |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 196 | struct s3c24x0_timers { |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 197 | u32 TCFG0; |
198 | u32 TCFG1; | ||||
199 | u32 TCON; | ||||
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 200 | struct s3c24x0_timer ch[4]; |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 201 | u32 TCNTB4; |
202 | u32 TCNTO4; | ||||
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 203 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 204 | |
205 | |||||
206 | /* USB DEVICE (see manual chapter 13) */ | ||||
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 207 | struct s3c24x0_usb_dev_fifos { |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 208 | #ifdef __BIG_ENDIAN |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 209 | u8 res[3]; |
210 | u8 EP_FIFO_REG; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 211 | #else /* little endian */ |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 212 | u8 EP_FIFO_REG; |
213 | u8 res[3]; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 214 | #endif |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 215 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 216 | |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 217 | struct s3c24x0_usb_dev_dmas { |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 218 | #ifdef __BIG_ENDIAN |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 219 | 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; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 231 | #else /* little endian */ |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 232 | 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]; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 244 | #endif |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 245 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 246 | |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 247 | struct s3c24x0_usb_device { |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 248 | #ifdef __BIG_ENDIAN |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 249 | 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; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 281 | #else /* little endian */ |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 282 | 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]; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 314 | #endif /* __BIG_ENDIAN */ |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 315 | struct s3c24x0_usb_dev_fifos fifo[5]; |
316 | struct s3c24x0_usb_dev_dmas dma[5]; | ||||
317 | }; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 318 | |
319 | |||||
320 | /* WATCH DOG TIMER (see manual chapter 18) */ | ||||
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 321 | struct s3c24x0_watchdog { |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 322 | u32 WTCON; |
323 | u32 WTDAT; | ||||
324 | u32 WTCNT; | ||||
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 325 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 326 | |
327 | |||||
328 | /* IIC (see manual chapter 20) */ | ||||
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 329 | struct s3c24x0_i2c { |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 330 | u32 IICCON; |
331 | u32 IICSTAT; | ||||
332 | u32 IICADD; | ||||
333 | u32 IICDS; | ||||
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 334 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 335 | |
336 | |||||
337 | /* IIS (see manual chapter 21) */ | ||||
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 338 | struct s3c24x0_i2s { |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 339 | #ifdef __BIG_ENDIAN |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 340 | 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; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 350 | #else /* little endian */ |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 351 | 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; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 361 | #endif |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 362 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 363 | |
364 | |||||
365 | /* I/O PORT (see manual chapter 9) */ | ||||
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 366 | struct s3c24x0_gpio { |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 367 | #ifdef CONFIG_S3C2400 |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 368 | u32 PACON; |
369 | u32 PADAT; | ||||
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 370 | |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 371 | u32 PBCON; |
372 | u32 PBDAT; | ||||
373 | u32 PBUP; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 374 | |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 375 | u32 PCCON; |
376 | u32 PCDAT; | ||||
377 | u32 PCUP; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 378 | |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 379 | u32 PDCON; |
380 | u32 PDDAT; | ||||
381 | u32 PDUP; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 382 | |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 383 | u32 PECON; |
384 | u32 PEDAT; | ||||
385 | u32 PEUP; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 386 | |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 387 | u32 PFCON; |
388 | u32 PFDAT; | ||||
389 | u32 PFUP; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 390 | |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 391 | u32 PGCON; |
392 | u32 PGDAT; | ||||
393 | u32 PGUP; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 394 | |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 395 | u32 OPENCR; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 396 | |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 397 | u32 MISCCR; |
398 | u32 EXTINT; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 399 | #endif |
400 | #ifdef CONFIG_S3C2410 | ||||
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 401 | 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; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 432 | |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 433 | 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; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 449 | #endif |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 450 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 451 | |
452 | |||||
453 | /* RTC (see manual chapter 17) */ | ||||
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 454 | struct s3c24x0_rtc { |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 455 | #ifdef __BIG_ENDIAN |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 456 | 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; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 490 | #else /* little endian */ |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 491 | 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]; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 526 | #endif |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 527 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 528 | |
529 | |||||
530 | /* ADC (see manual chapter 16) */ | ||||
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 531 | struct s3c2400_adc { |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 532 | u32 ADCCON; |
533 | u32 ADCDAT; | ||||
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 534 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 535 | |
536 | |||||
537 | /* ADC (see manual chapter 16) */ | ||||
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 538 | struct s3c2410_adc { |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 539 | u32 ADCCON; |
540 | u32 ADCTSC; | ||||
541 | u32 ADCDLY; | ||||
542 | u32 ADCDAT0; | ||||
543 | u32 ADCDAT1; | ||||
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 544 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 545 | |
546 | |||||
547 | /* SPI (see manual chapter 22) */ | ||||
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 548 | struct s3c24x0_spi_channel { |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 549 | 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.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 562 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 563 | |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 564 | struct s3c24x0_spi { |
565 | struct s3c24x0_spi_channel ch[S3C24X0_SPI_CHANNELS]; | ||||
566 | }; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 567 | |
568 | |||||
569 | /* MMC INTERFACE (see S3C2400 manual chapter 19) */ | ||||
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 570 | struct s3c2400_mmc { |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 571 | #ifdef __BIG_ENDIAN |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 572 | 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; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 596 | #else |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 597 | 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]; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 621 | #endif |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 622 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 623 | |
624 | |||||
625 | /* SD INTERFACE (see S3C2410 manual chapter 19) */ | ||||
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 626 | struct s3c2410_sdi { |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 627 | 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; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 642 | #ifdef __BIG_ENDIAN |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 643 | u8 res[3]; |
644 | u8 SDIDAT; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 645 | #else |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 646 | u8 SDIDAT; |
647 | u8 res[3]; | ||||
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 648 | #endif |
kevin.morfitt@fearnside-systems.co.uk | 9ebfdc2 | 2009-11-04 17:49:31 +0900 | [diff] [blame] | 649 | u32 SDIIMSK; |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame] | 650 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 651 | |
652 | #endif /*__S3C24X0_H__*/ |