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 | |
| 34 | typedef volatile u8 S3C24X0_REG8; |
| 35 | typedef volatile u16 S3C24X0_REG16; |
| 36 | typedef volatile u32 S3C24X0_REG32; |
| 37 | |
| 38 | /* Memory controller (see manual chapter 5) */ |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 39 | struct s3c24x0_memctl { |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 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; |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 46 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 47 | |
| 48 | |
| 49 | /* USB HOST (see manual chapter 12) */ |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 50 | struct s3c24x0_usb_host { |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 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; |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 74 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 75 | |
| 76 | |
| 77 | /* INTERRUPT (see manual chapter 14) */ |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 78 | struct s3c24x0_interrupt { |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 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 |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 89 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 90 | |
| 91 | |
| 92 | /* DMAS (see manual chapter 8) */ |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 93 | struct s3c24x0_dma { |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 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 |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 113 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 114 | |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 115 | struct s3c24x0_dmas { |
| 116 | struct s3c24x0_dma dma[4]; |
| 117 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 118 | |
| 119 | |
| 120 | /* CLOCK & POWER MANAGEMENT (see S3C2400 manual chapter 6) */ |
| 121 | /* (see S3C2410 manual chapter 7) */ |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 122 | struct s3c24x0_clock_power { |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 123 | S3C24X0_REG32 LOCKTIME; |
| 124 | S3C24X0_REG32 MPLLCON; |
| 125 | S3C24X0_REG32 UPLLCON; |
| 126 | S3C24X0_REG32 CLKCON; |
| 127 | S3C24X0_REG32 CLKSLOW; |
| 128 | S3C24X0_REG32 CLKDIVN; |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 129 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 130 | |
| 131 | |
| 132 | /* LCD CONTROLLER (see manual chapter 15) */ |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 133 | struct s3c24x0_lcd { |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 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 |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 154 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 155 | |
| 156 | |
| 157 | /* NAND FLASH (see S3C2410 manual chapter 6) */ |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 158 | struct s3c2410_nand { |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 159 | S3C24X0_REG32 NFCONF; |
| 160 | S3C24X0_REG32 NFCMD; |
| 161 | S3C24X0_REG32 NFADDR; |
| 162 | S3C24X0_REG32 NFDATA; |
| 163 | S3C24X0_REG32 NFSTAT; |
| 164 | S3C24X0_REG32 NFECC; |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 165 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 166 | |
| 167 | |
| 168 | /* UART (see manual chapter 11) */ |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 169 | struct s3c24x0_uart { |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 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; |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 190 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 191 | |
| 192 | |
| 193 | /* PWM TIMER (see manual chapter 10) */ |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 194 | struct s3c24x0_timer { |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 195 | S3C24X0_REG32 TCNTB; |
| 196 | S3C24X0_REG32 TCMPB; |
| 197 | S3C24X0_REG32 TCNTO; |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 198 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 199 | |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 200 | struct s3c24x0_timers { |
| 201 | S3C24X0_REG32 TCFG0; |
| 202 | S3C24X0_REG32 TCFG1; |
| 203 | S3C24X0_REG32 TCON; |
| 204 | struct s3c24x0_timer ch[4]; |
| 205 | S3C24X0_REG32 TCNTB4; |
| 206 | S3C24X0_REG32 TCNTO4; |
| 207 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 208 | |
| 209 | |
| 210 | /* USB DEVICE (see manual chapter 13) */ |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 211 | struct s3c24x0_usb_dev_fifos { |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 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 |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 219 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 220 | |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 221 | struct s3c24x0_usb_dev_dmas { |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 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 |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 249 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 250 | |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 251 | struct s3c24x0_usb_device { |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 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 */ |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 319 | struct s3c24x0_usb_dev_fifos fifo[5]; |
| 320 | struct s3c24x0_usb_dev_dmas dma[5]; |
| 321 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 322 | |
| 323 | |
| 324 | /* WATCH DOG TIMER (see manual chapter 18) */ |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 325 | struct s3c24x0_watchdog { |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 326 | S3C24X0_REG32 WTCON; |
| 327 | S3C24X0_REG32 WTDAT; |
| 328 | S3C24X0_REG32 WTCNT; |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 329 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 330 | |
| 331 | |
| 332 | /* IIC (see manual chapter 20) */ |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 333 | struct s3c24x0_i2c { |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 334 | S3C24X0_REG32 IICCON; |
| 335 | S3C24X0_REG32 IICSTAT; |
| 336 | S3C24X0_REG32 IICADD; |
| 337 | S3C24X0_REG32 IICDS; |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 338 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 339 | |
| 340 | |
| 341 | /* IIS (see manual chapter 21) */ |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 342 | struct s3c24x0_i2s { |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 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 |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 366 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 367 | |
| 368 | |
| 369 | /* I/O PORT (see manual chapter 9) */ |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 370 | struct s3c24x0_gpio { |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 371 | #ifdef CONFIG_S3C2400 |
| 372 | S3C24X0_REG32 PACON; |
| 373 | S3C24X0_REG32 PADAT; |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 374 | |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 375 | 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 |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 454 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 455 | |
| 456 | |
| 457 | /* RTC (see manual chapter 17) */ |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 458 | struct s3c24x0_rtc { |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 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 |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 531 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 532 | |
| 533 | |
| 534 | /* ADC (see manual chapter 16) */ |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 535 | struct s3c2400_adc { |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 536 | S3C24X0_REG32 ADCCON; |
| 537 | S3C24X0_REG32 ADCDAT; |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 538 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 539 | |
| 540 | |
| 541 | /* ADC (see manual chapter 16) */ |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 542 | struct s3c2410_adc { |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 543 | S3C24X0_REG32 ADCCON; |
| 544 | S3C24X0_REG32 ADCTSC; |
| 545 | S3C24X0_REG32 ADCDLY; |
| 546 | S3C24X0_REG32 ADCDAT0; |
| 547 | S3C24X0_REG32 ADCDAT1; |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 548 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 549 | |
| 550 | |
| 551 | /* SPI (see manual chapter 22) */ |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 552 | struct s3c24x0_spi_channel { |
Wolfgang Denk | 30fc5cd | 2009-08-25 12:22:38 +0200 | [diff] [blame] | 553 | S3C24X0_REG8 SPCON; |
| 554 | S3C24X0_REG8 res1[3]; |
| 555 | S3C24X0_REG8 SPSTA; |
| 556 | S3C24X0_REG8 res2[3]; |
| 557 | S3C24X0_REG8 SPPIN; |
| 558 | S3C24X0_REG8 res3[3]; |
| 559 | S3C24X0_REG8 SPPRE; |
| 560 | S3C24X0_REG8 res4[3]; |
| 561 | S3C24X0_REG8 SPTDAT; |
| 562 | S3C24X0_REG8 res5[3]; |
| 563 | S3C24X0_REG8 SPRDAT; |
| 564 | S3C24X0_REG8 res6[3]; |
| 565 | S3C24X0_REG8 res7[16]; |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 566 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 567 | |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 568 | struct s3c24x0_spi { |
| 569 | struct s3c24x0_spi_channel ch[S3C24X0_SPI_CHANNELS]; |
| 570 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 571 | |
| 572 | |
| 573 | /* MMC INTERFACE (see S3C2400 manual chapter 19) */ |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 574 | struct s3c2400_mmc { |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 575 | #ifdef __BIG_ENDIAN |
| 576 | S3C24X0_REG8 res1[3]; |
| 577 | S3C24X0_REG8 MMCON; |
| 578 | S3C24X0_REG8 res2[3]; |
| 579 | S3C24X0_REG8 MMCRR; |
| 580 | S3C24X0_REG8 res3[3]; |
| 581 | S3C24X0_REG8 MMFCON; |
| 582 | S3C24X0_REG8 res4[3]; |
| 583 | S3C24X0_REG8 MMSTA; |
| 584 | S3C24X0_REG16 res5; |
| 585 | S3C24X0_REG16 MMFSTA; |
| 586 | S3C24X0_REG8 res6[3]; |
| 587 | S3C24X0_REG8 MMPRE; |
| 588 | S3C24X0_REG16 res7; |
| 589 | S3C24X0_REG16 MMLEN; |
| 590 | S3C24X0_REG8 res8[3]; |
| 591 | S3C24X0_REG8 MMCR7; |
| 592 | S3C24X0_REG32 MMRSP[4]; |
| 593 | S3C24X0_REG8 res9[3]; |
| 594 | S3C24X0_REG8 MMCMD0; |
| 595 | S3C24X0_REG32 MMCMD1; |
| 596 | S3C24X0_REG16 res10; |
| 597 | S3C24X0_REG16 MMCR16; |
| 598 | S3C24X0_REG8 res11[3]; |
| 599 | S3C24X0_REG8 MMDAT; |
| 600 | #else |
| 601 | S3C24X0_REG8 MMCON; |
| 602 | S3C24X0_REG8 res1[3]; |
| 603 | S3C24X0_REG8 MMCRR; |
| 604 | S3C24X0_REG8 res2[3]; |
| 605 | S3C24X0_REG8 MMFCON; |
| 606 | S3C24X0_REG8 res3[3]; |
| 607 | S3C24X0_REG8 MMSTA; |
| 608 | S3C24X0_REG8 res4[3]; |
| 609 | S3C24X0_REG16 MMFSTA; |
| 610 | S3C24X0_REG16 res5; |
| 611 | S3C24X0_REG8 MMPRE; |
| 612 | S3C24X0_REG8 res6[3]; |
| 613 | S3C24X0_REG16 MMLEN; |
| 614 | S3C24X0_REG16 res7; |
| 615 | S3C24X0_REG8 MMCR7; |
| 616 | S3C24X0_REG8 res8[3]; |
| 617 | S3C24X0_REG32 MMRSP[4]; |
| 618 | S3C24X0_REG8 MMCMD0; |
| 619 | S3C24X0_REG8 res9[3]; |
| 620 | S3C24X0_REG32 MMCMD1; |
| 621 | S3C24X0_REG16 MMCR16; |
| 622 | S3C24X0_REG16 res10; |
| 623 | S3C24X0_REG8 MMDAT; |
| 624 | S3C24X0_REG8 res11[3]; |
| 625 | #endif |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 626 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 627 | |
| 628 | |
| 629 | /* SD INTERFACE (see S3C2410 manual chapter 19) */ |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 630 | struct s3c2410_sdi { |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 631 | S3C24X0_REG32 SDICON; |
| 632 | S3C24X0_REG32 SDIPRE; |
| 633 | S3C24X0_REG32 SDICARG; |
| 634 | S3C24X0_REG32 SDICCON; |
| 635 | S3C24X0_REG32 SDICSTA; |
| 636 | S3C24X0_REG32 SDIRSP0; |
| 637 | S3C24X0_REG32 SDIRSP1; |
| 638 | S3C24X0_REG32 SDIRSP2; |
| 639 | S3C24X0_REG32 SDIRSP3; |
| 640 | S3C24X0_REG32 SDIDTIMER; |
| 641 | S3C24X0_REG32 SDIBSIZE; |
| 642 | S3C24X0_REG32 SDIDCON; |
| 643 | S3C24X0_REG32 SDIDCNT; |
| 644 | S3C24X0_REG32 SDIDSTA; |
| 645 | S3C24X0_REG32 SDIFSTA; |
| 646 | #ifdef __BIG_ENDIAN |
| 647 | S3C24X0_REG8 res[3]; |
| 648 | S3C24X0_REG8 SDIDAT; |
| 649 | #else |
| 650 | S3C24X0_REG8 SDIDAT; |
| 651 | S3C24X0_REG8 res[3]; |
| 652 | #endif |
| 653 | S3C24X0_REG32 SDIIMSK; |
kevin.morfitt@fearnside-systems.co.uk | 8250d0b | 2009-10-10 13:32:01 +0900 | [diff] [blame^] | 654 | }; |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 655 | |
| 656 | #endif /*__S3C24X0_H__*/ |