Lines Matching +full:port +full:- +full:2

1 /* SPDX-License-Identifier: GPL-2.0 */
3 * linux/include/asm-m68k/raw_io.h
5 * 10/20/00 RZ: - created from bits of io.h and ide.h to cleanup namespace
43 #define raw_outb(val,port) out_8((port),(val)) argument
44 #define raw_outw(val,port) out_be16((port),(val)) argument
45 #define raw_outl(val,port) out_be32((port),(val)) argument
51 * Atari ROM port (cartridge port) ISA adapter, used for the EtherNEC NE2000
53 * The ISA adapter connects address lines A9-A13 to ISA address lines A0-A4,
56 * Data lines D8-D15 are connected to ISA data lines D0-D7 for reading.
57 * For writes, address lines A1-A8 are latched to ISA data lines D0-D7
58 * (meaning the bit pattern on A1-A8 can be read back as byte).
67 * chipset - 16 bit words are read straight off the ROM port while 16 bit
70 * asserted as A1-A8 address pattern). The high byte is then written to the
97 #define raw_rom_outb(val, port) rom_out_8((port), (val)) argument
98 #define raw_rom_outw(val, port) rom_out_be16((port), (val)) argument
101 static inline void raw_insb(const volatile u8 __iomem *port, u8 *buf, in raw_insb() argument
107 *buf++ = in_8(port); in raw_insb()
110 static inline void raw_outsb(volatile u8 __iomem *port, const u8 *buf, in raw_outsb() argument
116 tmp = (nr & 15) - 1; in raw_outsb()
118 "1: moveb %0@+,%2@; dbra %1,1b" in raw_outsb()
120 : "a" (port), "0" (buf), in raw_outsb()
124 tmp = (nr >> 4) - 1; in raw_outsb()
127 "moveb %0@+,%2@; " in raw_outsb()
128 "moveb %0@+,%2@; " in raw_outsb()
129 "moveb %0@+,%2@; " in raw_outsb()
130 "moveb %0@+,%2@; " in raw_outsb()
131 "moveb %0@+,%2@; " in raw_outsb()
132 "moveb %0@+,%2@; " in raw_outsb()
133 "moveb %0@+,%2@; " in raw_outsb()
134 "moveb %0@+,%2@; " in raw_outsb()
135 "moveb %0@+,%2@; " in raw_outsb()
136 "moveb %0@+,%2@; " in raw_outsb()
137 "moveb %0@+,%2@; " in raw_outsb()
138 "moveb %0@+,%2@; " in raw_outsb()
139 "moveb %0@+,%2@; " in raw_outsb()
140 "moveb %0@+,%2@; " in raw_outsb()
141 "moveb %0@+,%2@; " in raw_outsb()
142 "moveb %0@+,%2@; " in raw_outsb()
145 : "a" (port), "0" (buf), in raw_outsb()
150 static inline void raw_insw(volatile const u16 __iomem *port, u16 *buf, unsigned int nr) in raw_insw() argument
155 tmp = (nr & 15) - 1; in raw_insw()
157 "1: movew %2@,%0@+; dbra %1,1b" in raw_insw()
159 : "a" (port), "0" (buf), in raw_insw()
163 tmp = (nr >> 4) - 1; in raw_insw()
166 "movew %2@,%0@+; " in raw_insw()
167 "movew %2@,%0@+; " in raw_insw()
168 "movew %2@,%0@+; " in raw_insw()
169 "movew %2@,%0@+; " in raw_insw()
170 "movew %2@,%0@+; " in raw_insw()
171 "movew %2@,%0@+; " in raw_insw()
172 "movew %2@,%0@+; " in raw_insw()
173 "movew %2@,%0@+; " in raw_insw()
174 "movew %2@,%0@+; " in raw_insw()
175 "movew %2@,%0@+; " in raw_insw()
176 "movew %2@,%0@+; " in raw_insw()
177 "movew %2@,%0@+; " in raw_insw()
178 "movew %2@,%0@+; " in raw_insw()
179 "movew %2@,%0@+; " in raw_insw()
180 "movew %2@,%0@+; " in raw_insw()
181 "movew %2@,%0@+; " in raw_insw()
184 : "a" (port), "0" (buf), in raw_insw()
189 static inline void raw_outsw(volatile u16 __iomem *port, const u16 *buf, in raw_outsw() argument
195 tmp = (nr & 15) - 1; in raw_outsw()
197 "1: movew %0@+,%2@; dbra %1,1b" in raw_outsw()
199 : "a" (port), "0" (buf), in raw_outsw()
203 tmp = (nr >> 4) - 1; in raw_outsw()
206 "movew %0@+,%2@; " in raw_outsw()
207 "movew %0@+,%2@; " in raw_outsw()
208 "movew %0@+,%2@; " in raw_outsw()
209 "movew %0@+,%2@; " in raw_outsw()
210 "movew %0@+,%2@; " in raw_outsw()
211 "movew %0@+,%2@; " in raw_outsw()
212 "movew %0@+,%2@; " in raw_outsw()
213 "movew %0@+,%2@; " in raw_outsw()
214 "movew %0@+,%2@; " in raw_outsw()
215 "movew %0@+,%2@; " in raw_outsw()
216 "movew %0@+,%2@; " in raw_outsw()
217 "movew %0@+,%2@; " in raw_outsw()
218 "movew %0@+,%2@; " in raw_outsw()
219 "movew %0@+,%2@; " in raw_outsw()
220 "movew %0@+,%2@; " in raw_outsw()
221 "movew %0@+,%2@; " in raw_outsw()
224 : "a" (port), "0" (buf), in raw_outsw()
229 static inline void raw_insl(const volatile u32 __iomem *port, u32 *buf, unsigned int nr) in raw_insl() argument
234 tmp = (nr & 15) - 1; in raw_insl()
236 "1: movel %2@,%0@+; dbra %1,1b" in raw_insl()
238 : "a" (port), "0" (buf), in raw_insl()
242 tmp = (nr >> 4) - 1; in raw_insl()
245 "movel %2@,%0@+; " in raw_insl()
246 "movel %2@,%0@+; " in raw_insl()
247 "movel %2@,%0@+; " in raw_insl()
248 "movel %2@,%0@+; " in raw_insl()
249 "movel %2@,%0@+; " in raw_insl()
250 "movel %2@,%0@+; " in raw_insl()
251 "movel %2@,%0@+; " in raw_insl()
252 "movel %2@,%0@+; " in raw_insl()
253 "movel %2@,%0@+; " in raw_insl()
254 "movel %2@,%0@+; " in raw_insl()
255 "movel %2@,%0@+; " in raw_insl()
256 "movel %2@,%0@+; " in raw_insl()
257 "movel %2@,%0@+; " in raw_insl()
258 "movel %2@,%0@+; " in raw_insl()
259 "movel %2@,%0@+; " in raw_insl()
260 "movel %2@,%0@+; " in raw_insl()
263 : "a" (port), "0" (buf), in raw_insl()
268 static inline void raw_outsl(volatile u32 __iomem *port, const u32 *buf, in raw_outsl() argument
274 tmp = (nr & 15) - 1; in raw_outsl()
276 "1: movel %0@+,%2@; dbra %1,1b" in raw_outsl()
278 : "a" (port), "0" (buf), in raw_outsl()
282 tmp = (nr >> 4) - 1; in raw_outsl()
285 "movel %0@+,%2@; " in raw_outsl()
286 "movel %0@+,%2@; " in raw_outsl()
287 "movel %0@+,%2@; " in raw_outsl()
288 "movel %0@+,%2@; " in raw_outsl()
289 "movel %0@+,%2@; " in raw_outsl()
290 "movel %0@+,%2@; " in raw_outsl()
291 "movel %0@+,%2@; " in raw_outsl()
292 "movel %0@+,%2@; " in raw_outsl()
293 "movel %0@+,%2@; " in raw_outsl()
294 "movel %0@+,%2@; " in raw_outsl()
295 "movel %0@+,%2@; " in raw_outsl()
296 "movel %0@+,%2@; " in raw_outsl()
297 "movel %0@+,%2@; " in raw_outsl()
298 "movel %0@+,%2@; " in raw_outsl()
299 "movel %0@+,%2@; " in raw_outsl()
300 "movel %0@+,%2@; " in raw_outsl()
303 : "a" (port), "0" (buf), in raw_outsl()
309 static inline void raw_insw_swapw(const volatile u16 __iomem *port, u16 *buf, in raw_insw_swapw() argument
316 "movel %2,%/d6\n\t" in raw_insw_swapw()
323 : "g" (port), "g" (buf), "g" (nr) in raw_insw_swapw()
329 "movel %2,%/d6\n\t" in raw_insw_swapw()
358 : "g" (port), "g" (buf), "g" (nr) in raw_insw_swapw()
362 static inline void raw_outsw_swapw(volatile u16 __iomem *port, const u16 *buf, in raw_outsw_swapw() argument
369 "movel %2,%/d6\n\t" in raw_outsw_swapw()
376 : "g" (port), "g" (buf), "g" (nr) in raw_outsw_swapw()
382 "movel %2,%/d6\n\t" in raw_outsw_swapw()
411 : "g" (port), "g" (buf), "g" (nr) in raw_outsw_swapw()
417 static inline void raw_rom_insb(const volatile u8 __iomem *port, u8 *buf, in raw_rom_insb() argument
423 *buf++ = rom_in_8(port); in raw_rom_insb()
426 static inline void raw_rom_outsb(volatile u8 __iomem *port, const u8 *buf, in raw_rom_outsb() argument
432 rom_out_8(port, *buf++); in raw_rom_outsb()
435 static inline void raw_rom_insw(const volatile u16 __iomem *port, u16 *buf, in raw_rom_insw() argument
441 *buf++ = rom_in_be16(port); in raw_rom_insw()
444 static inline void raw_rom_outsw(volatile u16 __iomem *port, const u16 *buf, in raw_rom_outsw() argument
450 rom_out_be16(port, *buf++); in raw_rom_outsw()
453 static inline void raw_rom_insw_swapw(const volatile u16 __iomem *port, u16 *buf, in raw_rom_insw_swapw() argument
459 *buf++ = rom_in_le16(port); in raw_rom_insw_swapw()
462 static inline void raw_rom_outsw_swapw(volatile u16 __iomem *port, const u16 *buf, in raw_rom_outsw_swapw() argument
468 rom_out_le16(port, *buf++); in raw_rom_outsw_swapw()