1 | /** |
---|
2 | * @file |
---|
3 | * @ingroup amba |
---|
4 | * @brief Common GRLIB AMBA Core Register definitions |
---|
5 | */ |
---|
6 | |
---|
7 | /* |
---|
8 | * COPYRIGHT (c) 2012 |
---|
9 | * Aeroflex Gaisler |
---|
10 | * |
---|
11 | * The license and distribution terms for this file may be |
---|
12 | * found in the file LICENSE in this distribution or at |
---|
13 | * http://www.rtems.com/license/LICENSE. |
---|
14 | */ |
---|
15 | |
---|
16 | #ifndef __GRLIB_H__ |
---|
17 | #define __GRLIB_H__ |
---|
18 | |
---|
19 | #ifdef __cplusplus |
---|
20 | extern "C" { |
---|
21 | #endif |
---|
22 | |
---|
23 | /* ESA MEMORY CONTROLLER */ |
---|
24 | struct mctrl_regs { |
---|
25 | unsigned int mcfg1; |
---|
26 | unsigned int mcfg2; |
---|
27 | unsigned int mcfg3; |
---|
28 | }; |
---|
29 | |
---|
30 | /* APB UART */ |
---|
31 | struct apbuart_regs { |
---|
32 | volatile unsigned int data; |
---|
33 | volatile unsigned int status; |
---|
34 | volatile unsigned int ctrl; |
---|
35 | volatile unsigned int scaler; |
---|
36 | }; |
---|
37 | |
---|
38 | /* IRQMP and IRQAMP interrupt controllers */ |
---|
39 | struct irqmp_regs { |
---|
40 | volatile unsigned int ilevel; /* 0x00 */ |
---|
41 | volatile unsigned int ipend; /* 0x04 */ |
---|
42 | volatile unsigned int iforce; /* 0x08 */ |
---|
43 | volatile unsigned int iclear; /* 0x0c */ |
---|
44 | volatile unsigned int mpstat; /* 0x10 */ |
---|
45 | volatile unsigned int bcast; /* 0x14 */ |
---|
46 | volatile unsigned int notused02; /* 0x18 */ |
---|
47 | volatile unsigned int notused03; /* 0x1c */ |
---|
48 | volatile unsigned int ampctrl; /* 0x20 */ |
---|
49 | volatile unsigned int icsel[2]; /* 0x24,0x28 */ |
---|
50 | volatile unsigned int notused13; /* 0x2c */ |
---|
51 | volatile unsigned int notused20; /* 0x30 */ |
---|
52 | volatile unsigned int notused21; /* 0x34 */ |
---|
53 | volatile unsigned int notused22; /* 0x38 */ |
---|
54 | volatile unsigned int notused23; /* 0x3c */ |
---|
55 | volatile unsigned int mask[16]; /* 0x40 */ |
---|
56 | volatile unsigned int force[16]; /* 0x80 */ |
---|
57 | /* Extended IRQ registers */ |
---|
58 | volatile unsigned int intid[16]; /* 0xc0 */ |
---|
59 | /* 0x100, align to 4Kb boundary */ |
---|
60 | volatile unsigned int resv1[(0x1000-0x100)/4]; |
---|
61 | }; |
---|
62 | |
---|
63 | /* GPTIMER Timer instance */ |
---|
64 | struct gptimer_timer_regs { |
---|
65 | volatile unsigned int value; |
---|
66 | volatile unsigned int reload; |
---|
67 | volatile unsigned int ctrl; |
---|
68 | volatile unsigned int notused; |
---|
69 | }; |
---|
70 | |
---|
71 | /* GPTIMER common registers */ |
---|
72 | struct gptimer_regs { |
---|
73 | volatile unsigned int scaler_value; /* common timer registers */ |
---|
74 | volatile unsigned int scaler_reload; |
---|
75 | volatile unsigned int cfg; |
---|
76 | volatile unsigned int notused; |
---|
77 | struct gptimer_timer_regs timer[7]; |
---|
78 | }; |
---|
79 | |
---|
80 | /* GRGPIO GPIO */ |
---|
81 | struct grgpio_regs { |
---|
82 | volatile unsigned int data; /* 0x00 I/O port data register */ |
---|
83 | volatile unsigned int output; /* 0x04 I/O port output register */ |
---|
84 | volatile unsigned int dir; /* 0x08 I/O port direction register */ |
---|
85 | volatile unsigned int imask; /* 0x0C Interrupt mask register */ |
---|
86 | volatile unsigned int ipol; /* 0x10 Interrupt polarity register */ |
---|
87 | volatile unsigned int iedge; /* 0x14 Interrupt edge register */ |
---|
88 | volatile unsigned int bypass; /* 0x18 Bypass register */ |
---|
89 | }; |
---|
90 | |
---|
91 | #ifdef __cplusplus |
---|
92 | } |
---|
93 | #endif |
---|
94 | |
---|
95 | #endif |
---|