aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m32r/kernel/io_oaks32r.c
diff options
context:
space:
mode:
authorHirokazu Takata <takata@linux-m32r.org>2005-06-21 20:16:10 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-21 22:07:30 -0400
commit2368086344c3d67b0f4aecac39d620fb9b8795c3 (patch)
treeaa55003e311abf6049acd23f5ff7f8bfd24eca4c /arch/m32r/kernel/io_oaks32r.c
parentd4c477ca5448f19afaaf6c0cfd655009ea9e614d (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_oaks32r.c')
-rw-r--r--arch/m32r/kernel/io_oaks32r.c36
1 files changed, 7 insertions, 29 deletions
diff --git a/arch/m32r/kernel/io_oaks32r.c b/arch/m32r/kernel/io_oaks32r.c
index 286964794d51..9997dddd24d7 100644
--- a/arch/m32r/kernel/io_oaks32r.c
+++ b/arch/m32r/kernel/io_oaks32r.c
@@ -3,7 +3,7 @@
3 * 3 *
4 * Typical I/O routines for OAKS32R board. 4 * Typical I/O routines for OAKS32R board.
5 * 5 *
6 * Copyright (c) 2001-2004 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
@@ -90,35 +90,21 @@ unsigned long _inl(unsigned long port)
90 90
91unsigned char _inb_p(unsigned long port) 91unsigned char _inb_p(unsigned long port)
92{ 92{
93 unsigned char v; 93 unsigned char v = _inb(port);
94
95 if (port >= 0x300 && port < 0x320)
96 v = _ne_inb(PORT2ADDR_NE(port));
97 else
98 v = *(volatile unsigned char *)PORT2ADDR(port);
99
100 delay(); 94 delay();
101 return (v); 95 return (v);
102} 96}
103 97
104unsigned short _inw_p(unsigned long port) 98unsigned short _inw_p(unsigned long port)
105{ 99{
106 unsigned short v; 100 unsigned short v = _inw(port);
107
108 if (port >= 0x300 && port < 0x320)
109 v = _ne_inw(PORT2ADDR_NE(port));
110 else
111 v = *(volatile unsigned short *)PORT2ADDR(port);
112
113 delay(); 101 delay();
114 return (v); 102 return (v);
115} 103}
116 104
117unsigned long _inl_p(unsigned long port) 105unsigned long _inl_p(unsigned long port)
118{ 106{
119 unsigned long v; 107 unsigned long v = _inl(port);
120
121 v = *(volatile unsigned long *)PORT2ADDR(port);
122 delay(); 108 delay();
123 return (v); 109 return (v);
124} 110}
@@ -146,27 +132,19 @@ void _outl(unsigned long l, unsigned long port)
146 132
147void _outb_p(unsigned char b, unsigned long port) 133void _outb_p(unsigned char b, unsigned long port)
148{ 134{
149 if (port >= 0x300 && port < 0x320) 135 _outb(b, port);
150 _ne_outb(b, PORT2ADDR_NE(port));
151 else
152 *(volatile unsigned char *)PORT2ADDR(port) = b;
153
154 delay(); 136 delay();
155} 137}
156 138
157void _outw_p(unsigned short w, unsigned long port) 139void _outw_p(unsigned short w, unsigned long port)
158{ 140{
159 if (port >= 0x300 && port < 0x320) 141 _outw(w, port);
160 _ne_outw(w, PORT2ADDR_NE(port));
161 else
162 *(volatile unsigned short *)PORT2ADDR(port) = w;
163
164 delay(); 142 delay();
165} 143}
166 144
167void _outl_p(unsigned long l, unsigned long port) 145void _outl_p(unsigned long l, unsigned long port)
168{ 146{
169 *(volatile unsigned long *)PORT2ADDR(port) = l; 147 _outl(l, port);
170 delay(); 148 delay();
171} 149}
172 150