MOXA linux-2.6.x / linux-2.6.19-uc1 from UC-7110-LX-BOOTLOADER-1.9_VERSION-4.2.tgz
[linux-2.6.19-moxart.git] / include / asm-arm / arch-s3c44b0x / s3c44b0x.h
blob85acb3f3641a580f8034823a9ee6448fadc5b5e1
1 #ifndef _S3C44B0X_H_
2 #define _S3C44B0X_H_
4 #ifndef __ASSEMBLY__
5 #include <linux/types.h>
6 #include <asm/io.h>
8 /* macros defined to easy the operation of system registers */
9 #define SYSREG_GET(r) inl(r)
10 #define SYSREG_SET(r, v) outl((v), r)
11 #define SYSREG_AND_SET(r, v) outl(SYSREG_GET(r) & (v), r)
12 #define SYSREG_OR_SET(r, v) outl(SYSREG_GET(r) | (v), r)
13 #define SYSREG_CLR(r, v) SYSREG_AND_SET(r, ~(v))
15 #define SYSREG_GETB(r) inb(r)
16 #define SYSREG_SETB(r, v) outb((v), r)
17 #define SYSREG_AND_SETB(r, v) outb(SYSREG_GETB(r) & (v), r)
18 #define SYSREG_OR_SETB(r, v) outb(SYSREG_GETB(r) | (v), r)
19 #define SYSREG_CLRB(r, v) SYSREG_AND_SETB(r, ~(v))
21 #define SYSREG_GETW(r) inw(r)
22 #define SYSREG_SETW(r, v) outw((v), r)
23 #define SYSREG_AND_SETW(r, v) outw(SYSREG_GETW(r) & (v), r)
24 #define SYSREG_OR_SETW(r, v) outw(SYSREG_GETW(r) | (v), r)
25 #define SYSREG_CLRW(r, v) SYSREG_AND_SETW(r, ~(v))
27 #endif
29 /**
30 * register definitions for SAMSUNG S3C44B0X
32 * Copyright (C) 2003 Christian Schulte <schulte@sympat.de>
36 /*******************/
37 /*** CPU WRAPPER ***/
38 /*******************/
40 #define S3C44B0X_SYSCFG 0x01c00000
41 #define S3C44B0X_NCACHBE0 0x01c00004 /* configuration of non-cachable areas */
42 #define S3C44B0X_NCACHBE1 0x01c00008 /* configuration of non-cachable areas */
43 #define S3C44B0X_SBUSCON 0x01c40000 /* bus configuration */
45 /* SYSCFG */
46 #define S3C44B0X_SYSCFG_DA 0x00000020 /* Data Abort disable */
47 #define S3C44B0X_SYSCFG_RSE 0x00000010 /* Read Stall Option enable */
48 #define S3C44B0X_SYSCFG_WE 0x00000008 /* Write Buffer enable */
50 #define S3C44B0X_SYSCFG_CM_NONE 0x00000000 /* Cache Mode */
51 #define S3C44B0X_SYSCFG_CM_4K 0x00000002
52 #define S3C44B0X_SYSCFG_CM_8K 0x00000006
54 #define S3C44B0X_SYSCFG_SE 0x00000001 /* Stall Option enable */
56 /* SBUSCON */
57 #define S3C44B0X_SBUSCON_FIX 0x80000000 /* use the fixed configuration that follows (instead of round-robin) */
58 #define S3C44B0X_SBUSCON_S_LCD_DMA_1 0x00000000 /* read the bus priority of LCD-DMA */
59 #define S3C44B0X_SBUSCON_S_LCD_DMA_2 0x00004000
60 #define S3C44B0X_SBUSCON_S_LCD_DMA_3 0x00008000
61 #define S3C44B0X_SBUSCON_S_LCD_DMA_4 0x0000c000
62 #define S3C44B0X_SBUSCON_S_ZDMA_1 0x00000000 /* read the bus priority of Z DMA */
63 #define S3C44B0X_SBUSCON_S_ZDMA_2 0x00001000
64 #define S3C44B0X_SBUSCON_S_ZDMA_3 0x00002000
65 #define S3C44B0X_SBUSCON_S_ZDMA_4 0x00003000
66 #define S3C44B0X_SBUSCON_S_BDMA_1 0x00000000 /* read the bus priority of B DMA */
67 #define S3C44B0X_SBUSCON_S_BDMA_2 0x00000400
68 #define S3C44B0X_SBUSCON_S_BDMA_3 0x00000800
69 #define S3C44B0X_SBUSCON_S_BDMA_4 0x00000c00
70 #define S3C44B0X_SBUSCON_S_BREQ_1 0x00000000 /* read the bus priority of external BREAK REQUEST */
71 #define S3C44B0X_SBUSCON_S_BREQ_2 0x00000100
72 #define S3C44B0X_SBUSCON_S_BREQ_3 0x00000200
73 #define S3C44B0X_SBUSCON_S_BREQ_4 0x00000300
75 #define S3C44B0X_SBUSCON_LCD_DMA_1 0x00000000 /* set the bus priority of LCD-DMA */
76 #define S3C44B0X_SBUSCON_LCD_DMA_2 0x00000040
77 #define S3C44B0X_SBUSCON_LCD_DMA_3 0x00000080
78 #define S3C44B0X_SBUSCON_LCD_DMA_4 0x000000c0
79 #define S3C44B0X_SBUSCON_ZDMA_1 0x00000000 /* set the bus priority of Z DMA */
80 #define S3C44B0X_SBUSCON_ZDMA_2 0x00000010
81 #define S3C44B0X_SBUSCON_ZDMA_3 0x00000020
82 #define S3C44B0X_SBUSCON_ZDMA_4 0x00000030
83 #define S3C44B0X_SBUSCON_BDMA_1 0x00000000 /* set the bus priority of B DMA */
84 #define S3C44B0X_SBUSCON_BDMA_2 0x00000004
85 #define S3C44B0X_SBUSCON_BDMA_3 0x00000008
86 #define S3C44B0X_SBUSCON_BDMA_4 0x0000000c
87 #define S3C44B0X_SBUSCON_BREQ_1 0x00000000 /* set the bus priority of external BREAK REQUEST */
88 #define S3C44B0X_SBUSCON_BREQ_2 0x00000001
89 #define S3C44B0X_SBUSCON_BREQ_3 0x00000002
90 #define S3C44B0X_SBUSCON_BREQ_4 0x00000003
92 /*************************/
93 /*** MEMORY CONTROLLER ***/
94 /*************************/
96 #define S3C44B0X_BWSCON 0x01c80000 /* Bank size, width and type of memory */
97 #define S3C44B0X_BANKCON0 0x01c80004 /* timing and page modes */
98 #define S3C44B0X_BANKCON1 0x01c80008
99 #define S3C44B0X_BANKCON2 0x01c8000c
100 #define S3C44B0X_BANKCON3 0x01c80010
101 #define S3C44B0X_BANKCON4 0x01c80014
102 #define S3C44B0X_BANKCON5 0x01c80018
103 #define S3C44B0X_BANKCON6 0x01c8001c
104 #define S3C44B0X_BANKCON7 0x01c80020
105 #define S3C44B0X_REFRESH 0x01c80024 /* refresh timing */
106 #define S3C44B0X_BANKSIZE 0x01c80028 /* bank sizes 2,4,8,16,32 MB */
107 #define S3C44B0X_MRSRB6 0x01c8002c /* burst settings, CAS latency */
108 #define S3C44B0X_MRSRB7 0x01c80030
110 /* BWSCON */
111 #define S3C44B0X_BWSCON_ST7 0x80000000 /* use UB/LB addressing */
112 #define S3C44B0X_BWSCON_WS7 0x40000000 /* waitstate enable */
113 #define S3C44B0X_BWSCON_DW7_8 0x00000000 /* data bus width 8bit */
114 #define S3C44B0X_BWSCON_DW7_16 0x10000000 /* data bus width 16bit */
115 #define S3C44B0X_BWSCON_DW7_32 0x20000000 /* data bus width 32bit */
117 #define S3C44B0X_BWSCON_ST6 0x08000000 /* use UB/LB addressing */
118 #define S3C44B0X_BWSCON_WS6 0x04000000 /* waitstate enable */
119 #define S3C44B0X_BWSCON_DW6_8 0x00000000 /* data bus width 8bit */
120 #define S3C44B0X_BWSCON_DW6_16 0x01000000 /* data bus width 16bit */
121 #define S3C44B0X_BWSCON_DW6_32 0x02000000 /* data bus width 32bit */
123 #define S3C44B0X_BWSCON_ST5 0x00800000 /* use UB/LB addressing */
124 #define S3C44B0X_BWSCON_WS5 0x00400000 /* waitstate enable */
125 #define S3C44B0X_BWSCON_DW5_8 0x00000000 /* data bus width 8bit */
126 #define S3C44B0X_BWSCON_DW5_16 0x00100000 /* data bus width 16bit */
127 #define S3C44B0X_BWSCON_DW5_32 0x00200000 /* data bus width 32bit */
129 #define S3C44B0X_BWSCON_ST4 0x00080000 /* use UB/LB addressing */
130 #define S3C44B0X_BWSCON_WS4 0x00040000 /* waitstate enable */
131 #define S3C44B0X_BWSCON_DW4_8 0x00000000 /* data bus width 8bit */
132 #define S3C44B0X_BWSCON_DW4_16 0x00010000 /* data bus width 16bit */
133 #define S3C44B0X_BWSCON_DW4_32 0x00020000 /* data bus width 32bit */
135 #define S3C44B0X_BWSCON_ST3 0x00008000 /* use UB/LB addressing */
136 #define S3C44B0X_BWSCON_WS3 0x00004000 /* waitstate enable */
137 #define S3C44B0X_BWSCON_DW3_8 0x00000000 /* data bus width 8bit */
138 #define S3C44B0X_BWSCON_DW3_16 0x00001000 /* data bus width 16bit */
139 #define S3C44B0X_BWSCON_DW3_32 0x00002000 /* data bus width 32bit */
141 #define S3C44B0X_BWSCON_ST2 0x00000800 /* use UB/LB addressing */
142 #define S3C44B0X_BWSCON_WS2 0x00000400 /* waitstate enable */
143 #define S3C44B0X_BWSCON_DW2_8 0x00000000 /* data bus width 8bit */
144 #define S3C44B0X_BWSCON_DW2_16 0x00000100 /* data bus width 16bit */
145 #define S3C44B0X_BWSCON_DW2_32 0x00000200 /* data bus width 32bit */
147 #define S3C44B0X_BWSCON_ST1 0x00000080 /* use UB/LB addressing */
148 #define S3C44B0X_BWSCON_WS1 0x00000040 /* waitstate enable */
149 #define S3C44B0X_BWSCON_DW1_8 0x00000000 /* data bus width 8bit */
150 #define S3C44B0X_BWSCON_DW1_16 0x00000010 /* data bus width 16bit */
151 #define S3C44B0X_BWSCON_DW1_32 0x00000020 /* data bus width 32bit */
153 #define S3C44B0X_BWSCON_DW0_8 0x00000000 /* data bus width 8bit */
154 #define S3C44B0X_BWSCON_DW0_16 0x00000002 /* data bus width 16bit */
155 #define S3C44B0X_BWSCON_DW0_32 0x00000004 /* data bus width 32bit */
157 #define S3C44B0X_BWSCON_ENDIAN_BIG 0x00000001 /* read-only, samples the endianess input pin */
159 /* BANKCON */
160 #define S3C44B0X_BANKCON_TACS_0 0x00000000 /* time, adress setup to CS (in clocks) */
161 #define S3C44B0X_BANKCON_TACS_1 0x00002000
162 #define S3C44B0X_BANKCON_TACS_2 0x00004000
163 #define S3C44B0X_BANKCON_TACS_4 0x00006000
165 #define S3C44B0X_BANKCON_TCOS_0 0x00000000 /* time, CS to nOE (in clocks) */
166 #define S3C44B0X_BANKCON_TCOS_1 0x00000800
167 #define S3C44B0X_BANKCON_TCOS_2 0x00001000
168 #define S3C44B0X_BANKCON_TCOS_4 0x00001800
170 #define S3C44B0X_BANKCON_TACC_1 0x00000000 /* access cycle in clocks (in clocks) */
171 #define S3C44B0X_BANKCON_TACC_2 0x00000100
172 #define S3C44B0X_BANKCON_TACC_3 0x00000200
173 #define S3C44B0X_BANKCON_TACC_4 0x00000300
174 #define S3C44B0X_BANKCON_TACC_6 0x00000400
175 #define S3C44B0X_BANKCON_TACC_8 0x00000500
176 #define S3C44B0X_BANKCON_TACC_10 0x00000600
177 #define S3C44B0X_BANKCON_TACC_14 0x00000700
179 #define S3C44B0X_BANKCON_TOCH_0 0x00000000 /* time, CS hold on nOE (in clocks) */
180 #define S3C44B0X_BANKCON_TOCH_1 0x00000040
181 #define S3C44B0X_BANKCON_TOCH_2 0x00000080
182 #define S3C44B0X_BANKCON_TOCH_4 0x000000c0
184 #define S3C44B0X_BANKCON_TCAH_0 0x00000000 /* address hold on after CS (in clocks) */
185 #define S3C44B0X_BANKCON_TCAH_1 0x00000010
186 #define S3C44B0X_BANKCON_TCAH_2 0x00000020
187 #define S3C44B0X_BANKCON_TCAH_4 0x00000030
189 #define S3C44B0X_BANKCON_TPAC_2 0x00000000 /* page mode access cycle (in clocks) */
190 #define S3C44B0X_BANKCON_TPAC_3 0x00000004
191 #define S3C44B0X_BANKCON_TPAC_4 0x00000008
192 #define S3C44B0X_BANKCON_TPAC_6 0x0000000c
194 #define S3C44B0X_BANKCON_PMC_1 0x00000000 /* page mode config (in datawords) */
195 #define S3C44B0X_BANKCON_PMC_4 0x00000001
196 #define S3C44B0X_BANKCON_PMC_8 0x00000002
197 #define S3C44B0X_BANKCON_PMC_16 0x00000003
199 #define S3C44B0X_BANKCON_MT_SRAM 0x00000000 /* memory type selection */
200 #define S3C44B0X_BANKCON_MT_DRAM 0x00004000
201 #define S3C44B0X_BANKCON_MT_EDO 0x00008000
202 #define S3C44B0X_BANKCON_MT_SDRAM 0x00018000
204 /* only for FP-DRAM or EDO-DRAM */
205 #define S3C44B0X_BANKCON_TRCD_1 0x00000000 /* RAS to CAS delay */
206 #define S3C44B0X_BANKCON_TRCD_2 0x00000010
207 #define S3C44B0X_BANKCON_TRCD_3 0x00000020
208 #define S3C44B0X_BANKCON_TRCD_4 0x00000030
210 #define S3C44B0X_BANKCON_TCAS_1 0x00000000 /* CAS pulse width (in clocks) */
211 #define S3C44B0X_BANKCON_TCAS_2 0x00000008
213 #define S3C44B0X_BANKCON_TCP_1 0x00000000 /* CAS precharge (in clocks) */
214 #define S3C44B0X_BANKCON_TCP_2 0x00000004
216 #define S3C44B0X_BANKCON_CAN_8 0x00000000 /* column address number (in bits) */
217 #define S3C44B0X_BANKCON_CAN_9 0x00000001
218 #define S3C44B0X_BANKCON_CAN_10 0x00000002
219 #define S3C44B0X_BANKCON_CAN_11 0x00000003
221 /* only for SDRAM */
222 #define S3C44B0X_BANKCON_SDRAM_TRCD_2 0x00000000 /* RAS to CAS delay */
223 #define S3C44B0X_BANKCON_SDRAM_TRCD_3 0x00000004
224 #define S3C44B0X_BANKCON_SDRAM_TRCD_4 0x00000008
226 #define S3C44B0X_BANKCON_SCAN_8 0x00000000 /* column address number (in bits) */
227 #define S3C44B0X_BANKCON_SCAN_9 0x00000001
228 #define S3C44B0X_BANKCON_SCAN_10 0x00000002
231 /* REFRESH */
232 #define S3C44B0X_REFRESH_REFEN 0x00800000
233 #define S3C44B0X_REFRESH_TREFMD 0x00400000
236 #define S3C44B0X_REFRESH_TRP_1_5 0x00000000 /* for DRAM */
237 #define S3C44B0X_REFRESH_TRP_2_5 0x00000000
238 #define S3C44B0X_REFRESH_TRP_3_5 0x00000000
239 #define S3C44B0X_REFRESH_TRP_4_5 0x00000000
240 #define S3C44B0X_REFRESH_TRP_2 0x00000000 /* for SDRAM */
241 #define S3C44B0X_REFRESH_TRP_3 0x00000000
242 #define S3C44B0X_REFRESH_TRP_4 0x00000000
243 #define S3C44B0X_REFRESH_TRP_NONE 0x00000000
245 #define S3C44B0X_REFRESH_TRC_4 0x00000000 /* SDRAM RC minimum time */
246 #define S3C44B0X_REFRESH_TRC_5 0x00040000
247 #define S3C44B0X_REFRESH_TRC_6 0x00080000
248 #define S3C44B0X_REFRESH_TRC_7 0x000c0000
250 #define S3C44B0X_REFRESH_TCHR_1 0x00000000 /* CAS Hold Time (DRAM) */
251 #define S3C44B0X_REFRESH_TCHR_2 0x00010000
252 #define S3C44B0X_REFRESH_TCHR_3 0x00020000
253 #define S3C44B0X_REFRESH_TCHR_4 0x00030000
255 #define S3C44B0X_REFRESH_COUNTER 0x000003FF /* mask for the refresh counter (bit 0-10) */
257 /* BANKSIZE */
258 #define S3C44B0X_BANKSIZE_SCLKEN 0x00000010
259 #define S3C44B0X_BANKSIZE_BK76MAP_2 0x00000004
260 #define S3C44B0X_BANKSIZE_BK76MAP_4 0x00000005
261 #define S3C44B0X_BANKSIZE_BK76MAP_8 0x00000006
262 #define S3C44B0X_BANKSIZE_BK76MAP_16 0x00000007
263 #define S3C44B0X_BANKSIZE_BK76MAP_32 0x00000000
265 /* MRSRB */
266 #define S3C44B0X_MRSRB_WBL 0x00000200
267 #define S3C44B0X_MRSRB_CL_1 0x00000000
268 #define S3C44B0X_MRSRB_CL_2 0x00000020
269 #define S3C44B0X_MRSRB_CL_3 0x00000030
270 #define S3C44B0X_MRSRB_BT_SEQ 0x00000000
271 #define S3C44B0X_MRSRB_BT_NONSEQ 0x00000008
272 #define S3C44B0X_MRSRB_BL_1 0x00000000
274 /************/
275 /*** UART ***/
276 /************/
278 #define S3C44B0X_ULCON0 0x01d00000
279 #define S3C44B0X_UCON0 0x01d00004
280 #define S3C44B0X_UFCON0 0x01d00008
281 #define S3C44B0X_UMCON0 0x01d0000c
282 #define S3C44B0X_UTRSTAT0 0x01d00010
283 #define S3C44B0X_UERSTAT0 0x01d00014
284 #define S3C44B0X_UFSTAT0 0x01d00018
285 #define S3C44B0X_UMSTAT0 0x01d0001c
287 #ifdef CONFIG_CPU_BIG_ENDIAN
288 #define S3C44B0X_UTXH0 0x01d00023
289 #define S3C44B0X_URXH0 0x01d00027
290 #else
291 #define S3C44B0X_UTXH0 0x01d00020
292 #define S3C44B0X_URXH0 0x01d00024
293 #endif
295 #define S3C44B0X_UBRDIV0 0x01d00028
297 #define S3C44B0X_ULCON1 0x01d04000
298 #define S3C44B0X_UCON1 0x01d04004
299 #define S3C44B0X_UFCON1 0x01d04008
300 #define S3C44B0X_UMCON1 0x01d0400c
301 #define S3C44B0X_UTRSTAT1 0x01d04010
302 #define S3C44B0X_UERSTAT1 0x01d04014
303 #define S3C44B0X_UFSTAT1 0x01d04018
304 #define S3C44B0X_UMSTAT1 0x01d0401c
306 #ifdef CONFIG_CPU_BIG_ENDIAN
307 #define S3C44B0X_UTXH1 0x01d04023
308 #define S3C44B0X_URXH1 0x01d04027
309 #else
310 #define S3C44B0X_UTXH1 0x01d04020
311 #define S3C44B0X_URXH1 0x01d04024
312 #endif
314 #define S3C44B0X_UBRDIV1 0x01d04028
316 /* ULCON */
317 #define S3C44B0X_ULCON_IR 0x00000040
319 #define S3C44B0X_ULCON_PAR_NO 0x00000000
320 #define S3C44B0X_ULCON_PAR_ODD 0x00000020
321 #define S3C44B0X_ULCON_PAR_EVEN 0x00000028
322 #define S3C44B0X_ULCON_PAR_1 0x00000030
323 #define S3C44B0X_ULCON_PAR_0 0x00000038
325 #define S3C44B0X_ULCON_STOPB_1 0x00000000
326 #define S3C44B0X_ULCON_STOPB_2 0x00000004
328 #define S3C44B0X_ULCON_WORDLN_5 0x00000000
329 #define S3C44B0X_ULCON_WORDLN_6 0x00000001
330 #define S3C44B0X_ULCON_WORDLN_7 0x00000002
331 #define S3C44B0X_ULCON_WORDLN_8 0x00000003
333 /* UCON */
334 #define S3C44B0X_UCON_TXINT_LEVEL 0x00000200
335 #define S3C44B0X_UCON_RXINT_LEVEL 0x00000100
336 #define S3C44B0X_UCON_TXINT_PULSE 0x00000000
337 #define S3C44B0X_UCON_RXINT_PULSE 0x00000000
338 #define S3C44B0X_UCON_RX_TIMEOUT_EN 0x00000080
339 #define S3C44B0X_UCON_RX_ERR_INT_EN 0x00000040
340 #define S3C44B0X_UCON_LOOP 0x00000020
341 #define S3C44B0X_UCON_SEND_BREAK 0x00000010
343 #define S3C44B0X_UCON_TX_DIS 0x00000000
344 #define S3C44B0X_UCON_TX_MODE_INT_POLL 0x00000004
345 #define S3C44B0X_UCON_TX_MODE_BDMA0 0x00000008
346 #define S3C44B0X_UCON_TX_MODE_BDMA1 0x0000000c
348 #define S3C44B0X_UCON_RX_DIS 0x00000000
349 #define S3C44B0X_UCON_RX_MODE_INT_POLL 0x00000001
350 #define S3C44B0X_UCON_RX_MODE_BDMA0 0x00000002
351 #define S3C44B0X_UCON_RX_MODE_BDMA1 0x00000003
353 /* UFCON */
354 #define S3C44B0X_UFCON_TX_FIFO_0 0x00000000 /* TX FIFO byte size */
355 #define S3C44B0X_UFCON_TX_FIFO_4 0x00000040
356 #define S3C44B0X_UFCON_TX_FIFO_8 0x00000080
357 #define S3C44B0X_UFCON_TX_FIFO_12 0x000000c0
359 #define S3C44B0X_UFCON_RX_FIFO_4 0x00000000 /* RX FIFO byte size */
360 #define S3C44B0X_UFCON_RX_FIFO_8 0x00000010
361 #define S3C44B0X_UFCON_RX_FIFO_12 0x00000020
362 #define S3C44B0X_UFCON_RX_FIFO_16 0x00000030
364 #define S3C44B0X_UFCON_TX_FIFO_RST 0x00000004
365 #define S3C44B0X_UFCON_RX_FIFO_RST 0x00000002
366 #define S3C44B0X_UFCON_FIFO_EN 0x00000001 /* global FIFO enable */
368 /* UMCON */
369 #define S3C44B0X_UMCON_AFC 0x00000010 /* auto flow control */
370 #define S3C44B0X_UMCON_RQST_SEND 0x00000001 /* request to send 1=L(active RTS) 0=H(inactive RTS) */
372 /* UTRSTAT */
373 #define S3C44B0X_UTRSTAT_TSE 0x00000004 /* transmitter shifter empty */
374 #define S3C44B0X_UTRSTAT_TBE 0x00000002 /* transmitt buffer empty */
375 #define S3C44B0X_UTRSTAT_RBDR 0x00000001 /* receive buffer data ready */
377 /* UERSTAT */
378 #define S3C44B0X_UERSTAT_BREAK_DETECT 0x00000008
379 #define S3C44B0X_UERSTAT_FRAME_ERROR 0x00000004
380 #define S3C44B0X_UERSTAT_PARITY_ERROR 0x00000002
381 #define S3C44B0X_UERSTAT_OVERRUN_ERROR 0x00000001
383 /* UFSTAT */
384 #define S3C44B0X_UFSTAT_TX_FIFO_FULL 0x00000200
385 #define S3C44B0X_UFSTAT_RX_FIFO_FULL 0x00000100
386 #define S3C44B0X_UFSTAT_TX_FIFO_COUNT 0x000000F0
387 #define S3C44B0X_UFSTAT_RX_FIFO_COUNT 0x0000000F
389 /***********/
390 /*** SIO ***/
391 /***********/
393 #define S3C44B0X_SIOCON 0x01d14000
394 #define S3C44B0X_SIODAT 0x01d14004
395 #define S3C44B0X_SBRDR 0x01d14008
396 #define S3C44B0X_ITVCNT 0x01d1400c
397 #define S3C44B0X_DNCTZ 0x01d14010
399 /****************************/
400 /*** IIS (Inter IC Sound) ***/
401 /****************************/
403 #define S3C44B0X_IISCON 0x01d18000
404 #define S3C44B0X_IISMOD 0x01d18004
405 #define S3C44B0X_IISPSR 0x01d18008
406 #define S3C44B0X_IISFIFCON 0x01d1800c
407 #define S3C44B0X_IISFIF 0x01d18010
409 /*****************/
410 /*** I/O ports ***/
411 /*****************/
413 #define S3C44B0X_PCONA 0x01d20000
414 #define S3C44B0X_PDATA 0x01d20004
415 #define S3C44B0X_PCONB 0x01d20008
416 #define S3C44B0X_PDATB 0x01d2000c
418 #define S3C44B0X_PCONC 0x01d20010
419 #define S3C44B0X_PDATC 0x01d20014
420 #define S3C44B0X_PUPC 0x01d20018
421 #define S3C44B0X_PCOND 0x01d2001c
422 #define S3C44B0X_PDATD 0x01d20020
423 #define S3C44B0X_PUPD 0x01d20024
424 #define S3C44B0X_PCONE 0x01d20028
425 #define S3C44B0X_PDATE 0x01d2002c
426 #define S3C44B0X_PUPE 0x01d20030
427 #define S3C44B0X_PCONF 0x01d20034
428 #define S3C44B0X_PDATF 0x01d20038
429 #define S3C44B0X_PUPF 0x01d2003c
430 #define S3C44B0X_PCONG 0x01d20040
431 #define S3C44B0X_PDATG 0x01d20044
432 #define S3C44B0X_PUPG 0x01d20048
433 #define S3C44B0X_SPUCR 0x01d2004c
435 /***************************/
436 /*** external interrupts ***/
437 /***************************/
439 #define S3C44B0X_EXTINT 0x01d20050
440 #define S3C44B0X_EXTINPND 0x01d20054
442 /**********************/
443 /*** WATCHDOG TIMER ***/
444 /**********************/
446 #define S3C44B0X_WTCON 0x01d30000
447 #define S3C44B0X_WTDAT 0x01d30004
448 #define S3C44B0X_WTCNT 0x01d30008
450 /*********************/
451 /*** A/D CONVERTER ***/
452 /*********************/
454 #define S3C44B0X_ADCCON 0x01d40000
455 #define S3C44B0X_ADCPSR 0x01d40004
456 #define S3C44B0X_ADCDAT 0x01d40008
458 /*****************/
459 /*** PWM TIMER ***/
460 /*****************/
462 #define S3C44B0X_TCFG0 0x01d50000 /* prescaler configuration */
463 #define S3C44B0X_TCFG1 0x01d50004 /* MUX-input for PWM and DMA */
464 #define S3C44B0X_TCON 0x01d50008 /* timer control register (start/stop, PWM-out, auto-reload, dead-zone) */
465 #define S3C44B0X_TCNTB0 0x01d5000c /* timer counter "buffer" register (read-write) to update the timer counter */
466 #define S3C44B0X_TCMPB0 0x01d50010 /* timer compare register */
467 #define S3C44B0X_TCNTO0 0x01d50014 /* timer counter "observation" register (real counter value, read-only) */
468 #define S3C44B0X_TCNTB1 0x01d50018
469 #define S3C44B0X_TCMPB1 0x01d5001c
470 #define S3C44B0X_TCNTO1 0x01d50020
471 #define S3C44B0X_TCNTB2 0x01d50024
472 #define S3C44B0X_TCMPB2 0x01d50028
473 #define S3C44B0X_TCNTO2 0x01d5002c
474 #define S3C44B0X_TCNTB3 0x01d50030
475 #define S3C44B0X_TCMPB3 0x01d50034
476 #define S3C44B0X_TCNTO3 0x01d50038
477 #define S3C44B0X_TCNTB4 0x01d5003c
478 #define S3C44B0X_TCMPB4 0x01d50040
479 #define S3C44B0X_TCNTO4 0x01d50044
480 #define S3C44B0X_TCNTB5 0x01d50048
481 #define S3C44B0X_TCNTO5 0x01d5004c
483 /* TCON */
484 #define S3C44B0X_TCON_T5_AUTO 0x04000000 /* automatically reload the timer register (cycle) */
485 #define S3C44B0X_TCON_T5_MAN_UPDATE 0x02000000 /* manualy update the counter (read from TCNTBn) */
486 #define S3C44B0X_TCON_T5_START 0x01000000 /* start the timer (normal modus) if bit not set -> no decrement of counter */
488 #define S3C44B0X_TCON_T4_AUTO 0x00800000
489 #define S3C44B0X_TCON_T4_OUTPUT 0x00400000 /* enable output to the PWM-pin (controlled by TCMPBn and TCNTBn) */
490 #define S3C44B0X_TCON_T4_MAN_UPDATE 0x00200000
491 #define S3C44B0X_TCON_T4_START 0x00100000
493 #define S3C44B0X_TCON_T3_AUTO 0x00080000
494 #define S3C44B0X_TCON_T3_OUTPUT 0x00040000
495 #define S3C44B0X_TCON_T3_MAN_UPDATE 0x00020000
496 #define S3C44B0X_TCON_T3_START 0x00010000
498 #define S3C44B0X_TCON_T2_AUTO 0x00008000
499 #define S3C44B0X_TCON_T2_OUTPUT 0x00004000
500 #define S3C44B0X_TCON_T2_MAN_UPDATE 0x00002000
501 #define S3C44B0X_TCON_T2_START 0x00001000
503 #define S3C44B0X_TCON_T1_AUTO 0x00000800
504 #define S3C44B0X_TCON_T1_OUTPUT 0x00000400
505 #define S3C44B0X_TCON_T1_MAN_UPDATE 0x00000200
506 #define S3C44B0X_TCON_T1_START 0x00000100
508 #define S3C44B0X_TCON_DEAD_ZONE_EN 0x00000010 /* enable the dead zone for PWM-mode */
510 #define S3C44B0X_TCON_T0_AUTO 0x00000008
511 #define S3C44B0X_TCON_T0_OUTPUT 0x00000004
512 #define S3C44B0X_TCON_T0_MAN_UPDATE 0x00000002
513 #define S3C44B0X_TCON_T0_START 0x00000001
515 /***********/
516 /*** IIC ***/
517 /***********/
519 #define S3C44B0X_IICCON 0x01d60000
520 #define S3C44B0X_IICSTAT 0x01d60004
521 #define S3C44B0X_IICADD 0x01d60008
522 #define S3C44B0X_IICDS 0x01d6000c
524 /***********/
525 /*** RTC ***/
526 /***********/
528 #define S3C44B0X_RTCCON 0x01d70040
529 #define S3C44B0X_RTCALM 0x01d70050
530 #define S3C44B0X_ALMSEC 0x01d70054
531 #define S3C44B0X_ALMMIN 0x01d70058
532 #define S3C44B0X_ALMHOUR 0x01d7005c
533 #define S3C44B0X_ALMDAY 0x01d70060
534 #define S3C44B0X_ALMMON 0x01d70064
535 #define S3C44B0X_ALMYEAR 0x01d70068
536 #define S3C44B0X_RTCRST 0x01d7006c
537 #define S3C44B0X_BCDSEC 0x01d70070
538 #define S3C44B0X_BCDMIN 0x01d70074
539 #define S3C44B0X_BCDHOUR 0x01d70078
540 #define S3C44B0X_BCDDAY 0x01d7007c
541 #define S3C44B0X_BCDDATE 0x01d70080
542 #define S3C44B0X_BCDMON 0x01d70084
543 #define S3C44B0X_BCDYEAR 0x01d70088
544 #define S3C44B0X_TICINT 0x01d7008c
546 /********************************/
547 /*** CLOCK & POWER MANAGEMENT ***/
548 /********************************/
550 #define S3C44B0X_PLLCON 0x01d80000
551 #define S3C44B0X_CLKCON 0x01d80004
552 #define S3C44B0X_CLKSLOW 0x01d80008
553 #define S3C44B0X_LOCKTIME 0x01d8000c
555 #define S3C44B0X_CLKCON_IIS 0x4000
556 #define S3C44B0X_CLKCON_IIC 0x2000
557 #define S3C44B0X_CLKCON_ADC 0x1000
558 #define S3C44B0X_CLKCON_RTC 0x0800
559 #define S3C44B0X_CLKCON_GPIO 0x0400
560 #define S3C44B0X_CLKCON_UART1 0x0200
561 #define S3C44B0X_CLKCON_UART0 0x0100
562 #define S3C44B0X_CLKCON_BDMA 0x0080
563 #define S3C44B0X_CLKCON_LCDC 0x0040
564 #define S3C44B0X_CLKCON_SIO 0x0020
565 #define S3C44B0X_CLKCON_ZDMA 0x0010
566 #define S3C44B0X_CLKCON_PWMTIMER 0x0008
567 #define S3C44B0X_CLKCON_IDLE_BIT 0x0004
568 #define S3C44B0X_CLKCON_SL_IDLE 0x0002
569 #define S3C44B0X_CLKCON_STOP_BIT 0x0001
571 #define S3C44B0X_CLKSLOW_PLL_OFF 0x00000010
572 #define S3C44B0X_CLKSLOW_SLOW_BIT 0x00000008
573 #define S3C44B0X_CLKSLOW_VAL_0 0x00000000
574 #define S3C44B0X_CLKSLOW_VAL_1 0x00000001
575 #define S3C44B0X_CLKSLOW_VAL_2 0x00000002
576 #define S3C44B0X_CLKSLOW_VAL_3 0x00000003
578 /****************************/
579 /*** INTERRUPT CONTROLLER ***/
580 /****************************/
582 #define S3C44B0X_INTCON 0x01e00000
583 #define S3C44B0X_INTPND 0x01e00004
584 #define S3C44B0X_INTMOD 0x01e00008
585 #define S3C44B0X_INTMSK 0x01e0000c
586 #define S3C44B0X_I_PSLV 0x01e00010
587 #define S3C44B0X_I_PMST 0x01e00014
588 #define S3C44B0X_I_CSLV 0x01e00018
589 #define S3C44B0X_I_CMST 0x01e0001c
590 #define S3C44B0X_I_ISPR 0x01e00020
591 #define S3C44B0X_I_ISPC 0x01e00024
592 #define S3C44B0X_F_ISPR 0x01e00038
593 #define S3C44B0X_F_ISPC 0x01e0003c
595 /***********/
596 /*** DMA ***/
597 /***********/
599 #define S3C44B0X_ZDCON0 0x01e80000
600 #define S3C44B0X_ZDISRC0 0x01e80004
601 #define S3C44B0X_ZDIDES0 0x01e80008
602 #define S3C44B0X_ZDICNT0 0x01e8000c
603 #define S3C44B0X_ZDCSRC0 0x01e80010
604 #define S3C44B0X_ZDCDES0 0x01e80014
605 #define S3C44B0X_ZDCCNT0 0x01e80018
606 #define S3C44B0X_ZDCON1 0x01e80020
607 #define S3C44B0X_ZDISRC1 0x01e80024
608 #define S3C44B0X_ZDIDES1 0x01e80028
609 #define S3C44B0X_ZDICNT1 0x01e8002c
610 #define S3C44B0X_ZDCSRC1 0x01e80030
611 #define S3C44B0X_ZDCDES1 0x01e80034
612 #define S3C44B0X_ZDCCNT1 0x01e80038
614 #define S3C44B0X_BDCON0 0x01f80000
615 #define S3C44B0X_BDISRC0 0x01f80004
616 #define S3C44B0X_BDIDES0 0x01f80008
617 #define S3C44B0X_BDICNT0 0x01f8000c
618 #define S3C44B0X_BDCSRC0 0x01f80010
619 #define S3C44B0X_BDCDES0 0x01f80014
620 #define S3C44B0X_BDCCNT0 0x01f80018
621 #define S3C44B0X_BDCON1 0x01f80020
622 #define S3C44B0X_BDISRC1 0x01f80024
623 #define S3C44B0X_BDIDES1 0x01f80028
624 #define S3C44B0X_BDICNT1 0x01f8002c
625 #define S3C44B0X_BDCSRC1 0x01f80030
626 #define S3C44B0X_BDCDES1 0x01f80034
627 #define S3C44B0X_BDCCNT1 0x01f80038
629 #define S3C44B0X_ZDCON_STE_RDY 0x00000000
630 #define S3C44B0X_ZDCON_STE_NTC 0x00000040
631 #define S3C44B0X_ZDCON_STE_TC 0x00000080
633 #define S3C44B0X_ZDCON_QDS_EN 0x00000000
634 #define S3C44B0X_ZDCON_QDS_DIS 0x0000000c
636 #define S3C44B0X_ZDCON_CMD_NONE 0x00000000
637 #define S3C44B0X_ZDCON_CMD_START 0x00000001
638 #define S3C44B0X_ZDCON_CMD_PAUSE 0x00000002
639 #define S3C44B0X_ZDCON_CMD_CANCEL 0x00000003
642 /*********************
643 * LCD controller *
644 *********************/
645 #define S3C44B0X_LCD_MEM 0x0c060000
647 #define S3C44B0X_LCDCON1 0x01f00000
648 #define S3C44B0X_LCDCON2 0x01f00004
649 #define S3C44B0X_LCDCON3 0x01f00040
650 #define S3C44B0X_LCDSADDR1 0x01f00008
651 #define S3C44B0X_LCDSADDR2 0x01f0000c
652 #define S3C44B0X_LCDSADDR3 0x01f00010
654 #define S3C44B0X_REDLUT 0x01f00014
655 #define S3C44B0X_GREENLUT 0x01f00018
656 #define S3C44B0X_BLUELUT 0x01f0001c
657 #define S3C44B0X_DP1_2 0x01f00020
658 #define S3C44B0X_DP4_7 0x01f00024
659 #define S3C44B0X_DP3_5 0x01f00028
660 #define S3C44B0X_DP2_3 0x01f0002c
661 #define S3C44B0X_DP5_7 0x01f00030
662 #define S3C44B0X_DP3_4 0x01f00034
663 #define S3C44B0X_DP4_5 0x01f00038
664 #define S3C44B0X_DP6_7 0x01f0003c
666 #define S3C44B0X_DITHMODE 0x01f00044
668 /* LCDCON1 */
669 #define S3C44B0X_LCDCON1_WLH_4 0x00000000
670 #define S3C44B0X_LCDCON1_WLH_8 0x00000400
671 #define S3C44B0X_LCDCON1_WLH_12 0x00000800
672 #define S3C44B0X_LCDCON1_WLH_16 0x00000c00
674 #define S3C44B0X_LCDCON1_WDLY_4 0x00000000
675 #define S3C44B0X_LCDCON1_WDLY_8 0x00000100
676 #define S3C44B0X_LCDCON1_WDLY_12 0x00000200
677 #define S3C44B0X_LCDCON1_WDLY_16 0x00000300
679 #define S3C44B0X_LCDCON1_MMODE 0x00000080
681 #define S3C44B0X_LCDCON1_DISMODE_4D 0x00000000
682 #define S3C44B0X_LCDCON1_DISMODE_4S 0x00000020
683 #define S3C44B0X_LCDCON1_DISMODE_8S 0x00000040
685 #define S3C44B0X_LCDCON1_INVCLK 0x00000010
686 #define S3C44B0X_LCDCON1_INVLINE 0x00000008
687 #define S3C44B0X_LCDCON1_INVFRAME 0x00000004
688 #define S3C44B0X_LCDCON1_INVVD 0x00000002
689 #define S3C44B0X_LCDCON1_ENVID 0x00000001
692 /* LCDCON3 */
693 #define S3C44B0X_LCDCON3_SELFREFRESH 0x00000001
696 /* LCDSADDR1 */
697 #define S3C44B0X_LCDSADDR1_MONO 0x00000000
698 #define S3C44B0X_LCDSADDR1_GRAY_4 0x08000000
699 #define S3C44B0X_LCDSADDR1_GRAY_16 0x10000000
700 #define S3C44B0X_LCDSADDR1_COLOR 0x18000000
702 /* LCDSADDR2 */
703 #define S3C44B0X_LCDSADDR2_BSWP 0x20000000
704 #endif /* _S3C44B0X_H_ */