Go to the documentation of this file.
12 #ifndef _ASM_ARCH_SA1111
13 #define _ASM_ARCH_SA1111
15 #include <mach/bitfield.h>
22 #define SA1111_VBASE 0xf4000000
25 #define SA1111_p2v( x ) ((x) - SA1111_BASE + SA1111_VBASE)
26 #define SA1111_v2p( x ) ((x) - SA1111_VBASE + SA1111_BASE)
29 #define _SA1111(x) ((x) + sa1111->resource.start)
32 #define sa1111_writel(val,addr) __raw_writel(val, addr)
33 #define sa1111_readl(addr) __raw_readl(addr)
40 #define SA1111_ADDR_WIDTH (26)
41 #define SA1111_ADDR_MASK ((1<<SA1111_ADDR_WIDTH)-1)
42 #define SA1111_DMA_ADDR(x) ((x)&SA1111_ADDR_MASK)
48 #define SA1111_SAC_DMA_MIN_XFER (0x800)
58 #define SA1111_SKCR 0x0000
59 #define SA1111_SMCR 0x0004
60 #define SA1111_SKID 0x0008
62 #define SKCR_PLL_BYPASS (1<<0)
63 #define SKCR_RCLKEN (1<<1)
64 #define SKCR_SLEEP (1<<2)
65 #define SKCR_DOZE (1<<3)
66 #define SKCR_VCO_OFF (1<<4)
67 #define SKCR_SCANTSTEN (1<<5)
68 #define SKCR_CLKTSTEN (1<<6)
69 #define SKCR_RDYEN (1<<7)
70 #define SKCR_SELAC (1<<8)
71 #define SKCR_OPPC (1<<9)
72 #define SKCR_PLLTSTEN (1<<10)
73 #define SKCR_USBIOTSTEN (1<<11)
86 #define SKCR_OE_EN (1<<13)
88 #define SMCR_DTIM (1<<0)
89 #define SMCR_MBGE (1<<1)
90 #define SMCR_DRAC_0 (1<<2)
91 #define SMCR_DRAC_1 (1<<3)
92 #define SMCR_DRAC_2 (1<<4)
93 #define SMCR_DRAC Fld(3, 2)
94 #define SMCR_CLAT (1<<5)
96 #define SKID_SIREV_MASK (0x000000f0)
97 #define SKID_MTREV_MASK (0x0000000f)
98 #define SKID_ID_MASK (0xffffff00)
99 #define SKID_SA1111_ID (0x690cc200)
115 #define SA1111_SKPCR 0x0200
116 #define SA1111_SKCDR 0x0204
117 #define SA1111_SKAUD 0x0208
118 #define SA1111_SKPMC 0x020c
119 #define SA1111_SKPTC 0x0210
120 #define SA1111_SKPEN0 0x0214
121 #define SA1111_SKPWM0 0x0218
122 #define SA1111_SKPEN1 0x021c
123 #define SA1111_SKPWM1 0x0220
125 #define SKPCR_UCLKEN (1<<0)
126 #define SKPCR_ACCLKEN (1<<1)
127 #define SKPCR_I2SCLKEN (1<<2)
128 #define SKPCR_L3CLKEN (1<<3)
129 #define SKPCR_SCLKEN (1<<4)
130 #define SKPCR_PMCLKEN (1<<5)
131 #define SKPCR_PTCLKEN (1<<6)
132 #define SKPCR_DCLKEN (1<<7)
133 #define SKPCR_PWMCLKEN (1<<8)
136 #define SA1111_USB 0x0400
168 #define SA1111_SERAUDIO 0x0600
173 #define SA1111_SACR0 0x00
174 #define SA1111_SACR1 0x04
175 #define SA1111_SACR2 0x08
176 #define SA1111_SASR0 0x0c
177 #define SA1111_SASR1 0x10
178 #define SA1111_SASCR 0x18
179 #define SA1111_L3_CAR 0x1c
180 #define SA1111_L3_CDR 0x20
181 #define SA1111_ACCAR 0x24
182 #define SA1111_ACCDR 0x28
183 #define SA1111_ACSAR 0x2c
184 #define SA1111_ACSDR 0x30
185 #define SA1111_SADTCS 0x34
186 #define SA1111_SADTSA 0x38
187 #define SA1111_SADTCA 0x3c
188 #define SA1111_SADTSB 0x40
189 #define SA1111_SADTCB 0x44
190 #define SA1111_SADRCS 0x48
191 #define SA1111_SADRSA 0x4c
192 #define SA1111_SADRCA 0x50
193 #define SA1111_SADRSB 0x54
194 #define SA1111_SADRCB 0x58
195 #define SA1111_SAITR 0x5c
196 #define SA1111_SADR 0x80
198 #ifndef CONFIG_ARCH_PXA
200 #define SACR0_ENB (1<<0)
201 #define SACR0_BCKD (1<<2)
202 #define SACR0_RST (1<<3)
204 #define SACR1_AMSL (1<<0)
205 #define SACR1_L3EN (1<<1)
206 #define SACR1_L3MB (1<<2)
207 #define SACR1_DREC (1<<3)
208 #define SACR1_DRPL (1<<4)
209 #define SACR1_ENLBF (1<<5)
211 #define SACR2_TS3V (1<<0)
212 #define SACR2_TS4V (1<<1)
213 #define SACR2_WKUP (1<<2)
214 #define SACR2_DREC (1<<3)
215 #define SACR2_DRPL (1<<4)
216 #define SACR2_ENLBF (1<<5)
217 #define SACR2_RESET (1<<6)
219 #define SASR0_TNF (1<<0)
220 #define SASR0_RNE (1<<1)
221 #define SASR0_BSY (1<<2)
222 #define SASR0_TFS (1<<3)
223 #define SASR0_RFS (1<<4)
224 #define SASR0_TUR (1<<5)
225 #define SASR0_ROR (1<<6)
226 #define SASR0_L3WD (1<<16)
227 #define SASR0_L3RD (1<<17)
229 #define SASR1_TNF (1<<0)
230 #define SASR1_RNE (1<<1)
231 #define SASR1_BSY (1<<2)
232 #define SASR1_TFS (1<<3)
233 #define SASR1_RFS (1<<4)
234 #define SASR1_TUR (1<<5)
235 #define SASR1_ROR (1<<6)
236 #define SASR1_CADT (1<<16)
237 #define SASR1_SADR (1<<17)
238 #define SASR1_RSTO (1<<18)
239 #define SASR1_CLPM (1<<19)
240 #define SASR1_CRDY (1<<20)
241 #define SASR1_RS3V (1<<21)
242 #define SASR1_RS4V (1<<22)
244 #define SASCR_TUR (1<<5)
245 #define SASCR_ROR (1<<6)
246 #define SASCR_DTS (1<<16)
247 #define SASCR_RDD (1<<17)
248 #define SASCR_STO (1<<18)
250 #define SADTCS_TDEN (1<<0)
251 #define SADTCS_TDIE (1<<1)
252 #define SADTCS_TDBDA (1<<3)
253 #define SADTCS_TDSTA (1<<4)
254 #define SADTCS_TDBDB (1<<5)
255 #define SADTCS_TDSTB (1<<6)
256 #define SADTCS_TBIU (1<<7)
258 #define SADRCS_RDEN (1<<0)
259 #define SADRCS_RDIE (1<<1)
260 #define SADRCS_RDBDA (1<<3)
261 #define SADRCS_RDSTA (1<<4)
262 #define SADRCS_RDBDB (1<<5)
263 #define SADRCS_RDSTB (1<<6)
264 #define SADRCS_RBIU (1<<7)
266 #define SAD_CS_DEN (1<<0)
267 #define SAD_CS_DIE (1<<1)
268 #define SAD_CS_DBDA (1<<3)
269 #define SAD_CS_DSTA (1<<4)
270 #define SAD_CS_DBDB (1<<5)
271 #define SAD_CS_DSTB (1<<6)
272 #define SAD_CS_BIU (1<<7)
274 #define SAITR_TFS (1<<0)
275 #define SAITR_RFS (1<<1)
276 #define SAITR_TUR (1<<2)
277 #define SAITR_ROR (1<<3)
278 #define SAITR_CADT (1<<4)
279 #define SAITR_SADR (1<<5)
280 #define SAITR_RSTO (1<<6)
281 #define SAITR_TDBDA (1<<8)
282 #define SAITR_TDBDB (1<<9)
283 #define SAITR_RDBDA (1<<10)
284 #define SAITR_RDBDB (1<<11)
306 #define SA1111_GPIO 0x1000
308 #define SA1111_GPIO_PADDR (0x000)
309 #define SA1111_GPIO_PADRR (0x004)
310 #define SA1111_GPIO_PADWR (0x004)
311 #define SA1111_GPIO_PASDR (0x008)
312 #define SA1111_GPIO_PASSR (0x00c)
313 #define SA1111_GPIO_PBDDR (0x010)
314 #define SA1111_GPIO_PBDRR (0x014)
315 #define SA1111_GPIO_PBDWR (0x014)
316 #define SA1111_GPIO_PBSDR (0x018)
317 #define SA1111_GPIO_PBSSR (0x01c)
318 #define SA1111_GPIO_PCDDR (0x020)
319 #define SA1111_GPIO_PCDRR (0x024)
320 #define SA1111_GPIO_PCDWR (0x024)
321 #define SA1111_GPIO_PCSDR (0x028)
322 #define SA1111_GPIO_PCSSR (0x02c)
324 #define GPIO_A0 (1 << 0)
325 #define GPIO_A1 (1 << 1)
326 #define GPIO_A2 (1 << 2)
327 #define GPIO_A3 (1 << 3)
329 #define GPIO_B0 (1 << 8)
330 #define GPIO_B1 (1 << 9)
331 #define GPIO_B2 (1 << 10)
332 #define GPIO_B3 (1 << 11)
333 #define GPIO_B4 (1 << 12)
334 #define GPIO_B5 (1 << 13)
335 #define GPIO_B6 (1 << 14)
336 #define GPIO_B7 (1 << 15)
338 #define GPIO_C0 (1 << 16)
339 #define GPIO_C1 (1 << 17)
340 #define GPIO_C2 (1 << 18)
341 #define GPIO_C3 (1 << 19)
342 #define GPIO_C4 (1 << 20)
343 #define GPIO_C5 (1 << 21)
344 #define GPIO_C6 (1 << 22)
345 #define GPIO_C7 (1 << 23)
367 #define SA1111_INTC 0x1600
372 #define SA1111_INTTEST0 0x0000
373 #define SA1111_INTTEST1 0x0004
374 #define SA1111_INTEN0 0x0008
375 #define SA1111_INTEN1 0x000c
376 #define SA1111_INTPOL0 0x0010
377 #define SA1111_INTPOL1 0x0014
378 #define SA1111_INTTSTSEL 0x0018
379 #define SA1111_INTSTATCLR0 0x001c
380 #define SA1111_INTSTATCLR1 0x0020
381 #define SA1111_INTSET0 0x0024
382 #define SA1111_INTSET1 0x0028
383 #define SA1111_WAKEEN0 0x002c
384 #define SA1111_WAKEEN1 0x0030
385 #define SA1111_WAKEPOL0 0x0034
386 #define SA1111_WAKEPOL1 0x0038
389 #define SA1111_KBD 0x0a00
390 #define SA1111_MSE 0x0c00
393 #define SA1111_PCMCIA 0x1600
401 #define SA1111_DEVID_SBI (1 << 0)
402 #define SA1111_DEVID_SK (1 << 1)
403 #define SA1111_DEVID_USB (1 << 2)
404 #define SA1111_DEVID_SAC (1 << 3)
405 #define SA1111_DEVID_SSP (1 << 4)
406 #define SA1111_DEVID_PS2 (3 << 5)
407 #define SA1111_DEVID_PS2_KBD (1 << 5)
408 #define SA1111_DEVID_PS2_MSE (1 << 6)
409 #define SA1111_DEVID_GPIO (1 << 7)
410 #define SA1111_DEVID_INT (1 << 8)
411 #define SA1111_DEVID_PCMCIA (1 << 9)
423 #define SA1111_DEV(_d) container_of((_d), struct sa1111_dev, dev)
425 #define sa1111_get_drvdata(d) dev_get_drvdata(&(d)->dev)
426 #define sa1111_set_drvdata(d,p) dev_set_drvdata(&(d)->dev, p)
438 #define SA1111_DRV(_d) container_of((_d), struct sa1111_driver, drv)
440 #define SA1111_DRIVER_NAME(_sadev) ((_sadev)->dev.driver->name)
451 #define SA1111_AUDIO_ACLINK 0
452 #define SA1111_AUDIO_I2S 1