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_mappi.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_mappi.c')
-rw-r--r-- | arch/m32r/kernel/io_mappi.c | 74 |
1 files changed, 8 insertions, 66 deletions
diff --git a/arch/m32r/kernel/io_mappi.c b/arch/m32r/kernel/io_mappi.c index 85688ffb52f9..78033165fb5c 100644 --- a/arch/m32r/kernel/io_mappi.c +++ b/arch/m32r/kernel/io_mappi.c | |||
@@ -3,8 +3,8 @@ | |||
3 | * | 3 | * |
4 | * Typical I/O routines for Mappi board. | 4 | * Typical I/O routines for Mappi board. |
5 | * | 5 | * |
6 | * Copyright (c) 2001, 2002 Hiroyuki Kondo, Hirokazu Takata, | 6 | * Copyright (c) 2001-2005 Hiroyuki Kondo, Hirokazu Takata, |
7 | * Hitoshi Yamamoto | 7 | * Hitoshi Yamamoto |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/config.h> | 10 | #include <linux/config.h> |
@@ -130,57 +130,21 @@ unsigned long _inl(unsigned long port) | |||
130 | 130 | ||
131 | unsigned char _inb_p(unsigned long port) | 131 | unsigned char _inb_p(unsigned long port) |
132 | { | 132 | { |
133 | unsigned char v; | 133 | unsigned char v = _inb(port); |
134 | |||
135 | if (port >= 0x300 && port < 0x320) | ||
136 | v = _ne_inb(PORT2ADDR_NE(port)); | ||
137 | else | ||
138 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) | ||
139 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
140 | unsigned char b; | ||
141 | pcc_ioread(0, port, &b, sizeof(b), 1, 0); | ||
142 | return b; | ||
143 | } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { | ||
144 | unsigned char b; | ||
145 | pcc_ioread(1, port, &b, sizeof(b), 1, 0); | ||
146 | return b; | ||
147 | } else | ||
148 | #endif | ||
149 | v = *(volatile unsigned char *)PORT2ADDR(port); | ||
150 | |||
151 | delay(); | 134 | delay(); |
152 | return (v); | 135 | return (v); |
153 | } | 136 | } |
154 | 137 | ||
155 | unsigned short _inw_p(unsigned long port) | 138 | unsigned short _inw_p(unsigned long port) |
156 | { | 139 | { |
157 | unsigned short v; | 140 | unsigned short v = _inw(port); |
158 | |||
159 | if (port >= 0x300 && port < 0x320) | ||
160 | v = _ne_inw(PORT2ADDR_NE(port)); | ||
161 | else | ||
162 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) | ||
163 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
164 | unsigned short w; | ||
165 | pcc_ioread(0, port, &w, sizeof(w), 1, 0); | ||
166 | return w; | ||
167 | } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { | ||
168 | unsigned short w; | ||
169 | pcc_ioread(1, port, &w, sizeof(w), 1, 0); | ||
170 | return w; | ||
171 | } else | ||
172 | #endif | ||
173 | v = *(volatile unsigned short *)PORT2ADDR(port); | ||
174 | |||
175 | delay(); | 141 | delay(); |
176 | return (v); | 142 | return (v); |
177 | } | 143 | } |
178 | 144 | ||
179 | unsigned long _inl_p(unsigned long port) | 145 | unsigned long _inl_p(unsigned long port) |
180 | { | 146 | { |
181 | unsigned long v; | 147 | unsigned long v = _inl(port); |
182 | |||
183 | v = *(volatile unsigned long *)PORT2ADDR(port); | ||
184 | delay(); | 148 | delay(); |
185 | return (v); | 149 | return (v); |
186 | } | 150 | } |
@@ -229,41 +193,19 @@ void _outl(unsigned long l, unsigned long port) | |||
229 | 193 | ||
230 | void _outb_p(unsigned char b, unsigned long port) | 194 | void _outb_p(unsigned char b, unsigned long port) |
231 | { | 195 | { |
232 | if (port >= 0x300 && port < 0x320) | 196 | _outb(b, port); |
233 | _ne_outb(b, PORT2ADDR_NE(port)); | ||
234 | else | ||
235 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) | ||
236 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
237 | pcc_iowrite(0, port, &b, sizeof(b), 1, 0); | ||
238 | } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { | ||
239 | pcc_iowrite(1, port, &b, sizeof(b), 1, 0); | ||
240 | } else | ||
241 | #endif | ||
242 | *(volatile unsigned char *)PORT2ADDR(port) = b; | ||
243 | |||
244 | delay(); | 197 | delay(); |
245 | } | 198 | } |
246 | 199 | ||
247 | void _outw_p(unsigned short w, unsigned long port) | 200 | void _outw_p(unsigned short w, unsigned long port) |
248 | { | 201 | { |
249 | if (port >= 0x300 && port < 0x320) | 202 | _outw(w, port); |
250 | _ne_outw(w, PORT2ADDR_NE(port)); | ||
251 | else | ||
252 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) | ||
253 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
254 | pcc_iowrite(0, port, &w, sizeof(w), 1, 0); | ||
255 | } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { | ||
256 | pcc_iowrite(1, port, &w, sizeof(w), 1, 0); | ||
257 | } else | ||
258 | #endif | ||
259 | *(volatile unsigned short *)PORT2ADDR(port) = w; | ||
260 | |||
261 | delay(); | 203 | delay(); |
262 | } | 204 | } |
263 | 205 | ||
264 | void _outl_p(unsigned long l, unsigned long port) | 206 | void _outl_p(unsigned long l, unsigned long port) |
265 | { | 207 | { |
266 | *(volatile unsigned long *)PORT2ADDR(port) = l; | 208 | _outl(l, port); |
267 | delay(); | 209 | delay(); |
268 | } | 210 | } |
269 | 211 | ||