|
RTEMS 6.1-rc1
|
Go to the documentation of this file.
24#ifndef __AT91RM9200_H__
25#define __AT91RM9200_H__
29typedef volatile unsigned long vulong;
32#define AIC_SMR_BASE 0xFFFFF000
33#define AIC_SMR_REG(_x_) *(vulong *)(AIC_SMR_BASE + (_x_ & 0x7c))
36#define AIC_SVR_BASE 0xFFFFF080
37#define AIC_SVR_REG(_x_) *(vulong *)(AIC_SVR_BASE + (_x_ & 0x7c))
40#define AIC_CTL_BASE 0xFFFFF100
41#define AIC_CTL_REG(_x_) *(vulong *)(AIC_CTL_BASE + (_x_ & 0x7f))
45#define AIC_SMR_FIQ 0x00
46#define AIC_SMR_SYSIRQ 0x04
47#define AIC_SMR_PIOA 0x08
48#define AIC_SMR_PIOB 0x0c
49#define AIC_SMR_PIOC 0x10
50#define AIC_SMR_PIOD 0x14
51#define AIC_SMR_US0 0x18
52#define AIC_SMR_US1 0x1c
53#define AIC_SMR_US2 0x20
54#define AIC_SMR_US3 0x24
55#define AIC_SMR_MCI 0x28
56#define AIC_SMR_UDP 0x2c
57#define AIC_SMR_TWI 0x30
58#define AIC_SMR_SPI 0x34
59#define AIC_SMR_SSC0 0x38
60#define AIC_SMR_SSC1 0x3c
61#define AIC_SMR_SSC2 0x40
62#define AIC_SMR_TC0 0x44
63#define AIC_SMR_TC1 0x48
64#define AIC_SMR_TC2 0x4c
65#define AIC_SMR_TC3 0x50
66#define AIC_SMR_TC4 0x54
67#define AIC_SMR_TC5 0x58
68#define AIC_SMR_UHP 0x5c
69#define AIC_SMR_EMAC 0x60
70#define AIC_SMR_IRQ0 0x64
71#define AIC_SMR_IRQ1 0x68
72#define AIC_SMR_IRQ2 0x6c
73#define AIC_SMR_IRQ3 0x70
74#define AIC_SMR_IRQ4 0x74
75#define AIC_SMR_IRQ5 0x78
76#define AIC_SMR_IRQ6 0x7c
98#define AIC_ISR_IRQID_MASK 0x1f
101#define AIC_CISR_IRQ BIT1
102#define AIC_CISR_FIQ BIT0
105#define AIC_DCR_GMSK BIT1
106#define AIC_DCR_PROT BIT0
109#define AIC_SMR_PRIOR(_x_) ((_x_ & 0x07) << 0)
110#define AIC_SMR_SRC_LVL_LOW (0 << 5)
111#define AIC_SMR_SRC_EDGE_LOW (1 << 5)
112#define AIC_SMR_SRC_LVL_HI (2 << 5)
113#define AIC_SMR_SRC_EDGE_HI (3 << 5)
118#define DBGU_BASE 0xFFFFF200
119#define DBGU_REG(_x_) *(vulong *)(DBGU_BASE + _x_)
130#define DBGU_BRGR 0x20
133#define DBGU_FNTR 0x48
138#define USART0_BASE 0xFFFC0000
139#define USART1_BASE 0xFFFC4000
140#define USART2_BASE 0xFFFC8000
141#define USART3_BASE 0xFFFCC000
151#define ST_BASE 0xFFFFFD00
152#define ST_REG(_x_) *(vulong *)(ST_BASE + _x_)
168#define ST_CR_WDRST BIT0
171#define ST_PIMR_PIV_MASK 0x0000ffff
174#define ST_WDMR_EXTEN BIT17
175#define ST_WDMR_RSTEN BIT16
176#define ST_WDMR_WDV_MASK 0x0000ffff
179#define ST_RTMR_RTPRES_MASK 0x0000ffff
185#define ST_SR_ALMS BIT3
186#define ST_SR_RTTINC BIT2
187#define ST_SR_WDOVF BIT1
188#define ST_SR_PITS BIT0
191#define ST_RTAR_ALMV_MASK 0x000fffff
194#define ST_CRTR_CRTV_MASK 0x000fffff
210#define PDC_RNPR 0x110
211#define PDC_RNCR 0x114
212#define PDC_TNPR 0x118
213#define PDC_TNCR 0x11c
214#define PDC_PTCR 0x120
215#define PDC_PTSR 0x124
223#define PIOA_BASE 0xFFFFF400
224#define PIOA_REG(_x_) *(vulong *)(PIOA_BASE + _x_)
227#define PIOB_BASE 0xFFFFF600
228#define PIOB_REG(_x_) *(vulong *)(PIOB_BASE + _x_)
231#define PIOC_BASE 0xFFFFF800
232#define PIOC_REG(_x_) *(vulong *)(PIOC_BASE + _x_)
235#define PIOD_BASE 0xFFFFFA00
236#define PIOD_REG(_x_) *(vulong *)(PIOD_BASE + _x_)
241#define PMC_BASE 0xFFFFFC00
242#define PMC_REG(_x_) *(vulong *)(PMC_BASE + _x_)
247#define EMAC_BASE 0xFFFBC000
248#define EMAC_REG(_x_) *(vulong *)(EMAC_BASE + _x_)
253#define TC_BASE 0xFFFA0000
254#define TC_REG(_x_) *(vulong *)(TC_BASE + 0x00 + _x_)
255#define TC_TC0_REG(_x_) *(vulong *)(TC_BASE + 0x00 + _x_)
256#define TC_TC1_REG(_x_) *(vulong *)(TC_BASE + 0x40 + _x_)
257#define TC_TC2_REG(_x_) *(vulong *)(TC_BASE + 0x80 + _x_)
276#define TC_BCR_SYNC BIT1
279#define TC_BMR_TC0(_x_) ((_x_ & 0x3) << 0)
280#define TC_BMR_TC1(_x_) ((_x_ & 0x3) << 2)
281#define TC_BMR_TC2(_x_) ((_x_ & 0x3) << 4)
284#define TC_CCR_CLKEN BIT0
285#define TC_CCR_CLKDIS BIT1
286#define TC_CCR_SWTRG BIT2
289#define TC_CMR_TCCLKS(_x_) ((_x_ & 0x7) << 0)
290#define TC_CMR_CLKI BIT3
291#define TC_BURST(_x_) ((_x_ & 0x3 << 4)
295#define TC_CMR_LDBSTOP BIT6
296#define TC_CMR_LDBDIS BIT7
297#define TC_CMR_ETRGEDG(_x_) ((_x_ & 0x3) << 8)
298#define TC_CMR_ABETRG BIT10
299#define TC_CMR_CPCTRG BIT14
300#define TC_CMR_LDRA(_x_) ((_x_ & 0x3) << 16)
301#define TC_CMR_LDRB(_x_) ((_x_ & 0x3) << 18)
304#define TC_CMR_CPCSTOP BIT6
305#define TC_CMR_CPCDIS BIT7
306#define TC_CMR_EEVTEDG(_x_) ((_x_ & 0x3) << 8)
307#define TC_CMR_EEVT(_x_) ((_x_ & 0x3) << 10)
308#define TC_CMR_ENETRG BIT12
309#define TC_CMR_WAVESEL(_x_) ((_x_ & 0x3) << 13)
310#define TC_CMR_ACPA(_x_) ((_x_ & 0x3) << 16)
311#define TC_CMR_ACPC(_x_) ((_x_ & 0x3) << 18)
312#define TC_CMR_AEEVT(_x_) ((_x_ & 0x3) << 20)
313#define TC_CMR_ASWTRG(_x_) ((_x_ & 0x3) << 22)
314#define TC_CMR_BCPB(_x_) ((_x_ & 0x3) << 24)
315#define TC_CMR_BCPC(_x_) ((_x_ & 0x3) << 26)
316#define TC_CMR_BEEVT(_x_) ((_x_ & 0x3) << 28)
317#define TC_CMR_BSWTRG(_x_) ((_x_ & 0x3) << 30)
320#define TC_CV_MASK 0xffff
323#define TC_SR_COVFS BIT0
324#define TC_SR_LOVRS BIT1
325#define TC_SR_CPAS BIT2
326#define TC_SR_CPBS BIT3
327#define TC_SR_CPCS BIT4
328#define TC_SR_LDRAS BIT5
329#define TC_SR_LDRBS BIT6
330#define TC_SR_ETRGS BIT7
331#define TC_SR_CLKSTA BIT16
332#define TC_SR_MTIOA BIT17
333#define TC_SR_MTIOB BIT18
338#define EBI_BASE 0xFFFFFF60
339#define EBI_REG(_x_) *(vulong *)(EBI_BASE + _x_)
344#define SMC_REG(_x_) *(vulong *)(EBI_BASE + 0x10 + _x_)
349#define SDRC_REG(_x_) *(vulong *)(EBI_BASE + 0x30 + _x_)