diff options
author | Hirokazu Takata <takata@linux-m32r.org> | 2005-06-21 20:16:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-21 22:07:30 -0400 |
commit | 2368086344c3d67b0f4aecac39d620fb9b8795c3 (patch) | |
tree | aa55003e311abf6049acd23f5ff7f8bfd24eca4c /arch/m32r/kernel/io_mappi2.c | |
parent | d4c477ca5448f19afaaf6c0cfd655009ea9e614d (diff) |
[PATCH] m32r: Support M3A-2170(Mappi-III) platform
This patchset is for supporting a new m32r platform, M3A-2170(Mappi-III)
evaluation board. An M32R chip multiprocessor is equipped on the board.
http://http://www.linux-m32r.org/eng/platform/platform.html
* arch/m32r/Kconfig: Support Mappi-III platform.
* arch/m32r/kernel/Makefile: ditto.
* arch/m32r/kernel/io_mappi3.c: ditto.
* arch/m32r/kernel/setup.c: ditto.
* arch/m32r/kernel/setup_mappi3.c: ditto.
* include/asm-m32r/m32102.h: ditto.
* include/asm-m32r/m32r.h: ditto.
* include/asm-m32r/mappi3/mappi3_pld.h: ditto.
* include/asm-m32r/ide.h: CF support for Mappi-III.
* arch/m32r/kernel/setup_mappi3.c: ditto.
* arch/m32r/mappi3/defconfig.smp: A default config file for Mappi-III.
* arch/m32r/mappi3/dot.gdbinit: A default .gdbinit file for Mappi-III.
* arch/m32r/boot/compressed/m32r_sio.c: Modified for Mappi-III
- At boot time, m32r-g00ff bootloader makes MMU off for Mappi-III,
on the contrary it makes MMU on for Mappi-II.
* arch/m32r/kernel/io_mappi2.c: Update comments.
* arch/m32r/kernel/setup_mappi2.c: ditto.
Signed-off-by: Mamoru Sakugawa <sakugawa@linux-m32r.org>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/m32r/kernel/io_mappi2.c')
-rw-r--r-- | arch/m32r/kernel/io_mappi2.c | 92 |
1 files changed, 8 insertions, 84 deletions
diff --git a/arch/m32r/kernel/io_mappi2.c b/arch/m32r/kernel/io_mappi2.c index 4182cd4f97c8..5c03504bf653 100644 --- a/arch/m32r/kernel/io_mappi2.c +++ b/arch/m32r/kernel/io_mappi2.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Typical I/O routines for Mappi2 board. | 4 | * Typical I/O routines for Mappi2 board. |
5 | * | 5 | * |
6 | * Copyright (c) 2001-2003 Hiroyuki Kondo, Hirokazu Takata, | 6 | * Copyright (c) 2001-2005 Hiroyuki Kondo, Hirokazu Takata, |
7 | * Hitoshi Yamamoto, Mamoru Sakugawa | 7 | * Hitoshi Yamamoto, Mamoru Sakugawa |
8 | */ | 8 | */ |
9 | 9 | ||
@@ -25,7 +25,7 @@ extern void pcc_ioread_byte(int, unsigned long, void *, size_t, size_t, int); | |||
25 | extern void pcc_ioread_word(int, unsigned long, void *, size_t, size_t, int); | 25 | extern void pcc_ioread_word(int, unsigned long, void *, size_t, size_t, int); |
26 | extern void pcc_iowrite_byte(int, unsigned long, void *, size_t, size_t, int); | 26 | extern void pcc_iowrite_byte(int, unsigned long, void *, size_t, size_t, int); |
27 | extern void pcc_iowrite_word(int, unsigned long, void *, size_t, size_t, int); | 27 | extern void pcc_iowrite_word(int, unsigned long, void *, size_t, size_t, int); |
28 | #endif /* CONFIG_PCMCIA && CONFIG_MAPPI2_CFC */ | 28 | #endif /* CONFIG_PCMCIA && CONFIG_M32R_CFC */ |
29 | 29 | ||
30 | #define PORT2ADDR(port) _port2addr(port) | 30 | #define PORT2ADDR(port) _port2addr(port) |
31 | #define PORT2ADDR_NE(port) _port2addr_ne(port) | 31 | #define PORT2ADDR_NE(port) _port2addr_ne(port) |
@@ -169,64 +169,21 @@ unsigned long _inl(unsigned long port) | |||
169 | 169 | ||
170 | unsigned char _inb_p(unsigned long port) | 170 | unsigned char _inb_p(unsigned long port) |
171 | { | 171 | { |
172 | unsigned char v; | 172 | unsigned char v = _inb(port); |
173 | |||
174 | if (port >= LAN_IOSTART && port < LAN_IOEND) | ||
175 | v = _ne_inb(PORT2ADDR_NE(port)); | ||
176 | else | ||
177 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
178 | if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
179 | return *(volatile unsigned char *)__port2addr_ata(port); | ||
180 | } else | ||
181 | #endif | ||
182 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | ||
183 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
184 | unsigned char b; | ||
185 | pcc_ioread_byte(0, port, &b, sizeof(b), 1, 0); | ||
186 | return b; | ||
187 | } else | ||
188 | #endif | ||
189 | v = *(volatile unsigned char *)PORT2ADDR(port); | ||
190 | |||
191 | delay(); | 173 | delay(); |
192 | return (v); | 174 | return (v); |
193 | } | 175 | } |
194 | 176 | ||
195 | unsigned short _inw_p(unsigned long port) | 177 | unsigned short _inw_p(unsigned long port) |
196 | { | 178 | { |
197 | unsigned short v; | 179 | unsigned short v = _inw(port); |
198 | |||
199 | if (port >= LAN_IOSTART && port < LAN_IOEND) | ||
200 | v = _ne_inw(PORT2ADDR_NE(port)); | ||
201 | else | ||
202 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
203 | if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
204 | return *(volatile unsigned short *)__port2addr_ata(port); | ||
205 | } else | ||
206 | #endif | ||
207 | #if defined(CONFIG_USB) | ||
208 | if (port >= 0x340 && port < 0x3a0) | ||
209 | v = *(volatile unsigned short *)PORT2ADDR_USB(port); | ||
210 | else | ||
211 | #endif | ||
212 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | ||
213 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
214 | unsigned short w; | ||
215 | pcc_ioread_word(0, port, &w, sizeof(w), 1, 0); | ||
216 | return w; | ||
217 | } else | ||
218 | #endif | ||
219 | v = *(volatile unsigned short *)PORT2ADDR(port); | ||
220 | |||
221 | delay(); | 180 | delay(); |
222 | return (v); | 181 | return (v); |
223 | } | 182 | } |
224 | 183 | ||
225 | unsigned long _inl_p(unsigned long port) | 184 | unsigned long _inl_p(unsigned long port) |
226 | { | 185 | { |
227 | unsigned long v; | 186 | unsigned long v = _inl(port); |
228 | |||
229 | v = *(volatile unsigned long *)PORT2ADDR(port); | ||
230 | delay(); | 187 | delay(); |
231 | return (v); | 188 | return (v); |
232 | } | 189 | } |
@@ -284,52 +241,19 @@ void _outl(unsigned long l, unsigned long port) | |||
284 | 241 | ||
285 | void _outb_p(unsigned char b, unsigned long port) | 242 | void _outb_p(unsigned char b, unsigned long port) |
286 | { | 243 | { |
287 | if (port >= LAN_IOSTART && port < LAN_IOEND) | 244 | _outb(b, port); |
288 | _ne_outb(b, PORT2ADDR_NE(port)); | ||
289 | else | ||
290 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
291 | if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
292 | *(volatile unsigned char *)__port2addr_ata(port) = b; | ||
293 | } else | ||
294 | #endif | ||
295 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | ||
296 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
297 | pcc_iowrite_byte(0, port, &b, sizeof(b), 1, 0); | ||
298 | } else | ||
299 | #endif | ||
300 | *(volatile unsigned char *)PORT2ADDR(port) = b; | ||
301 | |||
302 | delay(); | 245 | delay(); |
303 | } | 246 | } |
304 | 247 | ||
305 | void _outw_p(unsigned short w, unsigned long port) | 248 | void _outw_p(unsigned short w, unsigned long port) |
306 | { | 249 | { |
307 | if (port >= LAN_IOSTART && port < LAN_IOEND) | 250 | _outw(w, port); |
308 | _ne_outw(w, PORT2ADDR_NE(port)); | ||
309 | else | ||
310 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
311 | if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
312 | *(volatile unsigned short *)__port2addr_ata(port) = w; | ||
313 | } else | ||
314 | #endif | ||
315 | #if defined(CONFIG_USB) | ||
316 | if (port >= 0x340 && port < 0x3a0) | ||
317 | *(volatile unsigned short *)PORT2ADDR_USB(port) = w; | ||
318 | else | ||
319 | #endif | ||
320 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | ||
321 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
322 | pcc_iowrite_word(0, port, &w, sizeof(w), 1, 0); | ||
323 | } else | ||
324 | #endif | ||
325 | *(volatile unsigned short *)PORT2ADDR(port) = w; | ||
326 | |||
327 | delay(); | 251 | delay(); |
328 | } | 252 | } |
329 | 253 | ||
330 | void _outl_p(unsigned long l, unsigned long port) | 254 | void _outl_p(unsigned long l, unsigned long port) |
331 | { | 255 | { |
332 | *(volatile unsigned long *)PORT2ADDR(port) = l; | 256 | _outl(l, port); |
333 | delay(); | 257 | delay(); |
334 | } | 258 | } |
335 | 259 | ||