diff options
author | sfking@fdwdc.com <sfking@fdwdc.com> | 2009-06-19 21:11:06 -0400 |
---|---|---|
committer | Greg Ungerer <gerg@uclinux.org> | 2009-09-09 22:01:23 -0400 |
commit | f1554da34f11518bde33776c292c1b58fc20f073 (patch) | |
tree | 87e2ff94bbdf9c5172df7f976a581e2aff0d13fd /arch/m68k | |
parent | 9e8ded166dcc7831ee6f31f8a0937cd9b58e83b0 (diff) |
generic GPIO support for the Freescale Coldfire 527x.
Add support for the 5271 & 5275.
Signed-off-by: Steven King <sfking@fdwdc.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Diffstat (limited to 'arch/m68k')
-rw-r--r-- | arch/m68k/include/asm/m527xsim.h | 169 |
1 files changed, 169 insertions, 0 deletions
diff --git a/arch/m68k/include/asm/m527xsim.h b/arch/m68k/include/asm/m527xsim.h index 95f4f8ee8f7c..453356d72d80 100644 --- a/arch/m68k/include/asm/m527xsim.h +++ b/arch/m68k/include/asm/m527xsim.h | |||
@@ -54,6 +54,175 @@ | |||
54 | #define MCFSIM_DMR1 0x5c /* SDRAM address mask 1 */ | 54 | #define MCFSIM_DMR1 0x5c /* SDRAM address mask 1 */ |
55 | #endif | 55 | #endif |
56 | 56 | ||
57 | |||
58 | #ifdef CONFIG_M5271 | ||
59 | #define MCFGPIO_PODR_ADDR (MCF_IPSBAR + 0x100000) | ||
60 | #define MCFGPIO_PODR_DATAH (MCF_IPSBAR + 0x100001) | ||
61 | #define MCFGPIO_PODR_DATAL (MCF_IPSBAR + 0x100002) | ||
62 | #define MCFGPIO_PODR_BUSCTL (MCF_IPSBAR + 0x100003) | ||
63 | #define MCFGPIO_PODR_BS (MCF_IPSBAR + 0x100004) | ||
64 | #define MCFGPIO_PODR_CS (MCF_IPSBAR + 0x100005) | ||
65 | #define MCFGPIO_PODR_SDRAM (MCF_IPSBAR + 0x100006) | ||
66 | #define MCFGPIO_PODR_FECI2C (MCF_IPSBAR + 0x100007) | ||
67 | #define MCFGPIO_PODR_UARTH (MCF_IPSBAR + 0x100008) | ||
68 | #define MCFGPIO_PODR_UARTL (MCF_IPSBAR + 0x100009) | ||
69 | #define MCFGPIO_PODR_QSPI (MCF_IPSBAR + 0x10000A) | ||
70 | #define MCFGPIO_PODR_TIMER (MCF_IPSBAR + 0x10000B) | ||
71 | |||
72 | #define MCFGPIO_PDDR_ADDR (MCF_IPSBAR + 0x100010) | ||
73 | #define MCFGPIO_PDDR_DATAH (MCF_IPSBAR + 0x100011) | ||
74 | #define MCFGPIO_PDDR_DATAL (MCF_IPSBAR + 0x100012) | ||
75 | #define MCFGPIO_PDDR_BUSCTL (MCF_IPSBAR + 0x100013) | ||
76 | #define MCFGPIO_PDDR_BS (MCF_IPSBAR + 0x100014) | ||
77 | #define MCFGPIO_PDDR_CS (MCF_IPSBAR + 0x100015) | ||
78 | #define MCFGPIO_PDDR_SDRAM (MCF_IPSBAR + 0x100016) | ||
79 | #define MCFGPIO_PDDR_FECI2C (MCF_IPSBAR + 0x100017) | ||
80 | #define MCFGPIO_PDDR_UARTH (MCF_IPSBAR + 0x100018) | ||
81 | #define MCFGPIO_PDDR_UARTL (MCF_IPSBAR + 0x100019) | ||
82 | #define MCFGPIO_PDDR_QSPI (MCF_IPSBAR + 0x10001A) | ||
83 | #define MCFGPIO_PDDR_TIMER (MCF_IPSBAR + 0x10001B) | ||
84 | |||
85 | #define MCFGPIO_PPDSDR_ADDR (MCF_IPSBAR + 0x100020) | ||
86 | #define MCFGPIO_PPDSDR_DATAH (MCF_IPSBAR + 0x100021) | ||
87 | #define MCFGPIO_PPDSDR_DATAL (MCF_IPSBAR + 0x100022) | ||
88 | #define MCFGPIO_PPDSDR_BUSCTL (MCF_IPSBAR + 0x100023) | ||
89 | #define MCFGPIO_PPDSDR_BS (MCF_IPSBAR + 0x100024) | ||
90 | #define MCFGPIO_PPDSDR_CS (MCF_IPSBAR + 0x100025) | ||
91 | #define MCFGPIO_PPDSDR_SDRAM (MCF_IPSBAR + 0x100026) | ||
92 | #define MCFGPIO_PPDSDR_FECI2C (MCF_IPSBAR + 0x100027) | ||
93 | #define MCFGPIO_PPDSDR_UARTH (MCF_IPSBAR + 0x100028) | ||
94 | #define MCFGPIO_PPDSDR_UARTL (MCF_IPSBAR + 0x100029) | ||
95 | #define MCFGPIO_PPDSDR_QSPI (MCF_IPSBAR + 0x10002A) | ||
96 | #define MCFGPIO_PPDSDR_TIMER (MCF_IPSBAR + 0x10002B) | ||
97 | |||
98 | #define MCFGPIO_PCLRR_ADDR (MCF_IPSBAR + 0x100030) | ||
99 | #define MCFGPIO_PCLRR_DATAH (MCF_IPSBAR + 0x100031) | ||
100 | #define MCFGPIO_PCLRR_DATAL (MCF_IPSBAR + 0x100032) | ||
101 | #define MCFGPIO_PCLRR_BUSCTL (MCF_IPSBAR + 0x100033) | ||
102 | #define MCFGPIO_PCLRR_BS (MCF_IPSBAR + 0x100034) | ||
103 | #define MCFGPIO_PCLRR_CS (MCF_IPSBAR + 0x100035) | ||
104 | #define MCFGPIO_PCLRR_SDRAM (MCF_IPSBAR + 0x100036) | ||
105 | #define MCFGPIO_PCLRR_FECI2C (MCF_IPSBAR + 0x100037) | ||
106 | #define MCFGPIO_PCLRR_UARTH (MCF_IPSBAR + 0x100038) | ||
107 | #define MCFGPIO_PCLRR_UARTL (MCF_IPSBAR + 0x100039) | ||
108 | #define MCFGPIO_PCLRR_QSPI (MCF_IPSBAR + 0x10003A) | ||
109 | #define MCFGPIO_PCLRR_TIMER (MCF_IPSBAR + 0x10003B) | ||
110 | |||
111 | /* | ||
112 | * Generic GPIO support | ||
113 | */ | ||
114 | #define MCFGPIO_PODR MCFGPIO_PODR_ADDR | ||
115 | #define MCFGPIO_PDDR MCFGPIO_PDDR_ADDR | ||
116 | #define MCFGPIO_PPDR MCFGPIO_PPDSDR_ADDR | ||
117 | #define MCFGPIO_SETR MCFGPIO_PPDSDR_ADDR | ||
118 | #define MCFGPIO_CLRR MCFGPIO_PCLRR_ADDR | ||
119 | |||
120 | #define MCFGPIO_PIN_MAX 100 | ||
121 | #define MCFGPIO_IRQ_MAX 8 | ||
122 | #define MCFGPIO_IRQ_VECBASE MCFINT_VECBASE | ||
123 | #endif | ||
124 | |||
125 | #ifdef CONFIG_M5275 | ||
126 | #define MCFGPIO_PODR_BUSCTL (MCF_IPSBAR + 0x100004) | ||
127 | #define MCFGPIO_PODR_ADDR (MCF_IPSBAR + 0x100005) | ||
128 | #define MCFGPIO_PODR_CS (MCF_IPSBAR + 0x100008) | ||
129 | #define MCFGPIO_PODR_FEC0H (MCF_IPSBAR + 0x10000A) | ||
130 | #define MCFGPIO_PODR_FEC0L (MCF_IPSBAR + 0x10000B) | ||
131 | #define MCFGPIO_PODR_FECI2C (MCF_IPSBAR + 0x10000C) | ||
132 | #define MCFGPIO_PODR_QSPI (MCF_IPSBAR + 0x10000D) | ||
133 | #define MCFGPIO_PODR_SDRAM (MCF_IPSBAR + 0x10000E) | ||
134 | #define MCFGPIO_PODR_TIMERH (MCF_IPSBAR + 0x10000F) | ||
135 | #define MCFGPIO_PODR_TIMERL (MCF_IPSBAR + 0x100010) | ||
136 | #define MCFGPIO_PODR_UARTL (MCF_IPSBAR + 0x100011) | ||
137 | #define MCFGPIO_PODR_FEC1H (MCF_IPSBAR + 0x100012) | ||
138 | #define MCFGPIO_PODR_FEC1L (MCF_IPSBAR + 0x100013) | ||
139 | #define MCFGPIO_PODR_BS (MCF_IPSBAR + 0x100014) | ||
140 | #define MCFGPIO_PODR_IRQ (MCF_IPSBAR + 0x100015) | ||
141 | #define MCFGPIO_PODR_USBH (MCF_IPSBAR + 0x100016) | ||
142 | #define MCFGPIO_PODR_USBL (MCF_IPSBAR + 0x100017) | ||
143 | #define MCFGPIO_PODR_UARTH (MCF_IPSBAR + 0x100018) | ||
144 | |||
145 | #define MCFGPIO_PDDR_BUSCTL (MCF_IPSBAR + 0x100020) | ||
146 | #define MCFGPIO_PDDR_ADDR (MCF_IPSBAR + 0x100021) | ||
147 | #define MCFGPIO_PDDR_CS (MCF_IPSBAR + 0x100024) | ||
148 | #define MCFGPIO_PDDR_FEC0H (MCF_IPSBAR + 0x100026) | ||
149 | #define MCFGPIO_PDDR_FEC0L (MCF_IPSBAR + 0x100027) | ||
150 | #define MCFGPIO_PDDR_FECI2C (MCF_IPSBAR + 0x100028) | ||
151 | #define MCFGPIO_PDDR_QSPI (MCF_IPSBAR + 0x100029) | ||
152 | #define MCFGPIO_PDDR_SDRAM (MCF_IPSBAR + 0x10002A) | ||
153 | #define MCFGPIO_PDDR_TIMERH (MCF_IPSBAR + 0x10002B) | ||
154 | #define MCFGPIO_PDDR_TIMERL (MCF_IPSBAR + 0x10002C) | ||
155 | #define MCFGPIO_PDDR_UARTL (MCF_IPSBAR + 0x10002D) | ||
156 | #define MCFGPIO_PDDR_FEC1H (MCF_IPSBAR + 0x10002E) | ||
157 | #define MCFGPIO_PDDR_FEC1L (MCF_IPSBAR + 0x10002F) | ||
158 | #define MCFGPIO_PDDR_BS (MCF_IPSBAR + 0x100030) | ||
159 | #define MCFGPIO_PDDR_IRQ (MCF_IPSBAR + 0x100031) | ||
160 | #define MCFGPIO_PDDR_USBH (MCF_IPSBAR + 0x100032) | ||
161 | #define MCFGPIO_PDDR_USBL (MCF_IPSBAR + 0x100033) | ||
162 | #define MCFGPIO_PDDR_UARTH (MCF_IPSBAR + 0x100034) | ||
163 | |||
164 | #define MCFGPIO_PPDSDR_BUSCTL (MCF_IPSBAR + 0x10003C) | ||
165 | #define MCFGPIO_PPDSDR_ADDR (MCF_IPSBAR + 0x10003D) | ||
166 | #define MCFGPIO_PPDSDR_CS (MCF_IPSBAR + 0x100040) | ||
167 | #define MCFGPIO_PPDSDR_FEC0H (MCF_IPSBAR + 0x100042) | ||
168 | #define MCFGPIO_PPDSDR_FEC0L (MCF_IPSBAR + 0x100043) | ||
169 | #define MCFGPIO_PPDSDR_FECI2C (MCF_IPSBAR + 0x100044) | ||
170 | #define MCFGPIO_PPDSDR_QSPI (MCF_IPSBAR + 0x100045) | ||
171 | #define MCFGPIO_PPDSDR_SDRAM (MCF_IPSBAR + 0x100046) | ||
172 | #define MCFGPIO_PPDSDR_TIMERH (MCF_IPSBAR + 0x100047) | ||
173 | #define MCFGPIO_PPDSDR_TIMERL (MCF_IPSBAR + 0x100048) | ||
174 | #define MCFGPIO_PPDSDR_UARTL (MCF_IPSBAR + 0x100049) | ||
175 | #define MCFGPIO_PPDSDR_FEC1H (MCF_IPSBAR + 0x10004A) | ||
176 | #define MCFGPIO_PPDSDR_FEC1L (MCF_IPSBAR + 0x10004B) | ||
177 | #define MCFGPIO_PPDSDR_BS (MCF_IPSBAR + 0x10004C) | ||
178 | #define MCFGPIO_PPDSDR_IRQ (MCF_IPSBAR + 0x10004D) | ||
179 | #define MCFGPIO_PPDSDR_USBH (MCF_IPSBAR + 0x10004E) | ||
180 | #define MCFGPIO_PPDSDR_USBL (MCF_IPSBAR + 0x10004F) | ||
181 | #define MCFGPIO_PPDSDR_UARTH (MCF_IPSBAR + 0x100050) | ||
182 | |||
183 | #define MCFGPIO_PCLRR_BUSCTL (MCF_IPSBAR + 0x100058) | ||
184 | #define MCFGPIO_PCLRR_ADDR (MCF_IPSBAR + 0x100059) | ||
185 | #define MCFGPIO_PCLRR_CS (MCF_IPSBAR + 0x10005C) | ||
186 | #define MCFGPIO_PCLRR_FEC0H (MCF_IPSBAR + 0x10005E) | ||
187 | #define MCFGPIO_PCLRR_FEC0L (MCF_IPSBAR + 0x10005F) | ||
188 | #define MCFGPIO_PCLRR_FECI2C (MCF_IPSBAR + 0x100060) | ||
189 | #define MCFGPIO_PCLRR_QSPI (MCF_IPSBAR + 0x100061) | ||
190 | #define MCFGPIO_PCLRR_SDRAM (MCF_IPSBAR + 0x100062) | ||
191 | #define MCFGPIO_PCLRR_TIMERH (MCF_IPSBAR + 0x100063) | ||
192 | #define MCFGPIO_PCLRR_TIMERL (MCF_IPSBAR + 0x100064) | ||
193 | #define MCFGPIO_PCLRR_UARTL (MCF_IPSBAR + 0x100065) | ||
194 | #define MCFGPIO_PCLRR_FEC1H (MCF_IPSBAR + 0x100066) | ||
195 | #define MCFGPIO_PCLRR_FEC1L (MCF_IPSBAR + 0x100067) | ||
196 | #define MCFGPIO_PCLRR_BS (MCF_IPSBAR + 0x100068) | ||
197 | #define MCFGPIO_PCLRR_IRQ (MCF_IPSBAR + 0x100069) | ||
198 | #define MCFGPIO_PCLRR_USBH (MCF_IPSBAR + 0x10006A) | ||
199 | #define MCFGPIO_PCLRR_USBL (MCF_IPSBAR + 0x10006B) | ||
200 | #define MCFGPIO_PCLRR_UARTH (MCF_IPSBAR + 0x10006C) | ||
201 | |||
202 | |||
203 | /* | ||
204 | * Generic GPIO support | ||
205 | */ | ||
206 | #define MCFGPIO_PODR MCFGPIO_PODR_BUSCTL | ||
207 | #define MCFGPIO_PDDR MCFGPIO_PDDR_BUSCTL | ||
208 | #define MCFGPIO_PPDR MCFGPIO_PPDSDR_BUSCTL | ||
209 | #define MCFGPIO_SETR MCFGPIO_PPDSDR_BUSCTL | ||
210 | #define MCFGPIO_CLRR MCFGPIO_PCLRR_BUSCTL | ||
211 | |||
212 | #define MCFGPIO_PIN_MAX 148 | ||
213 | #define MCFGPIO_IRQ_MAX 8 | ||
214 | #define MCFGPIO_IRQ_VECBASE MCFINT_VECBASE | ||
215 | #endif | ||
216 | |||
217 | /* | ||
218 | * EPort | ||
219 | */ | ||
220 | |||
221 | #define MCFEPORT_EPDDR (MCF_IPSBAR + 0x130002) | ||
222 | #define MCFEPORT_EPDR (MCF_IPSBAR + 0x130004) | ||
223 | #define MCFEPORT_EPPDR (MCF_IPSBAR + 0x130005) | ||
224 | |||
225 | |||
57 | /* | 226 | /* |
58 | * GPIO pins setups to enable the UARTs. | 227 | * GPIO pins setups to enable the UARTs. |
59 | */ | 228 | */ |