diff options
-rw-r--r-- | include/asm-alpha/io.h | 84 | ||||
-rw-r--r-- | include/asm-arm/io.h | 36 | ||||
-rw-r--r-- | include/asm-i386/io.h | 12 | ||||
-rw-r--r-- | include/asm-mips/io.h | 13 | ||||
-rw-r--r-- | include/asm-parisc/io.h | 18 | ||||
-rw-r--r-- | include/asm-sh/io.h | 14 | ||||
-rw-r--r-- | include/asm-x86_64/io.h | 12 |
7 files changed, 0 insertions, 189 deletions
diff --git a/include/asm-alpha/io.h b/include/asm-alpha/io.h index 871dd7ad909d..3ebbeee753e9 100644 --- a/include/asm-alpha/io.h +++ b/include/asm-alpha/io.h | |||
@@ -534,9 +534,6 @@ extern void outsl (unsigned long port, const void *src, unsigned long count); | |||
534 | #define eth_io_copy_and_sum(skb,src,len,unused) \ | 534 | #define eth_io_copy_and_sum(skb,src,len,unused) \ |
535 | memcpy_fromio((skb)->data,src,len) | 535 | memcpy_fromio((skb)->data,src,len) |
536 | 536 | ||
537 | #define isa_eth_io_copy_and_sum(skb,src,len,unused) \ | ||
538 | isa_memcpy_fromio((skb)->data,src,len) | ||
539 | |||
540 | static inline int | 537 | static inline int |
541 | check_signature(const volatile void __iomem *io_addr, | 538 | check_signature(const volatile void __iomem *io_addr, |
542 | const unsigned char *signature, int length) | 539 | const unsigned char *signature, int length) |
@@ -550,87 +547,6 @@ check_signature(const volatile void __iomem *io_addr, | |||
550 | return 1; | 547 | return 1; |
551 | } | 548 | } |
552 | 549 | ||
553 | |||
554 | /* | ||
555 | * ISA space is mapped to some machine-specific location on Alpha. | ||
556 | * Call into the existing hooks to get the address translated. | ||
557 | */ | ||
558 | |||
559 | static inline u8 | ||
560 | isa_readb(unsigned long offset) | ||
561 | { | ||
562 | void __iomem *addr = ioremap(offset, 1); | ||
563 | u8 ret = readb(addr); | ||
564 | iounmap(addr); | ||
565 | return ret; | ||
566 | } | ||
567 | |||
568 | static inline u16 | ||
569 | isa_readw(unsigned long offset) | ||
570 | { | ||
571 | void __iomem *addr = ioremap(offset, 2); | ||
572 | u16 ret = readw(addr); | ||
573 | iounmap(addr); | ||
574 | return ret; | ||
575 | } | ||
576 | |||
577 | static inline u32 | ||
578 | isa_readl(unsigned long offset) | ||
579 | { | ||
580 | void __iomem *addr = ioremap(offset, 2); | ||
581 | u32 ret = readl(addr); | ||
582 | iounmap(addr); | ||
583 | return ret; | ||
584 | } | ||
585 | |||
586 | static inline void | ||
587 | isa_writeb(u8 b, unsigned long offset) | ||
588 | { | ||
589 | void __iomem *addr = ioremap(offset, 2); | ||
590 | writeb(b, addr); | ||
591 | iounmap(addr); | ||
592 | } | ||
593 | |||
594 | static inline void | ||
595 | isa_writew(u16 w, unsigned long offset) | ||
596 | { | ||
597 | void __iomem *addr = ioremap(offset, 2); | ||
598 | writew(w, addr); | ||
599 | iounmap(addr); | ||
600 | } | ||
601 | |||
602 | static inline void | ||
603 | isa_writel(u32 l, unsigned long offset) | ||
604 | { | ||
605 | void __iomem *addr = ioremap(offset, 2); | ||
606 | writel(l, addr); | ||
607 | iounmap(addr); | ||
608 | } | ||
609 | |||
610 | static inline void | ||
611 | isa_memset_io(unsigned long offset, u8 val, long n) | ||
612 | { | ||
613 | void __iomem *addr = ioremap(offset, n); | ||
614 | memset_io(addr, val, n); | ||
615 | iounmap(addr); | ||
616 | } | ||
617 | |||
618 | static inline void | ||
619 | isa_memcpy_fromio(void *dest, unsigned long offset, long n) | ||
620 | { | ||
621 | void __iomem *addr = ioremap(offset, n); | ||
622 | memcpy_fromio(dest, addr, n); | ||
623 | iounmap(addr); | ||
624 | } | ||
625 | |||
626 | static inline void | ||
627 | isa_memcpy_toio(unsigned long offset, const void *src, long n) | ||
628 | { | ||
629 | void __iomem *addr = ioremap(offset, n); | ||
630 | memcpy_toio(addr, src, n); | ||
631 | iounmap(addr); | ||
632 | } | ||
633 | |||
634 | /* | 550 | /* |
635 | * The Alpha Jensen hardware for some rather strange reason puts | 551 | * The Alpha Jensen hardware for some rather strange reason puts |
636 | * the RTC clock at 0x170 instead of 0x70. Probably due to some | 552 | * the RTC clock at 0x170 instead of 0x70. Probably due to some |
diff --git a/include/asm-arm/io.h b/include/asm-arm/io.h index fd0147e52dbb..b3479fc1cc8f 100644 --- a/include/asm-arm/io.h +++ b/include/asm-arm/io.h | |||
@@ -226,42 +226,6 @@ out: | |||
226 | #endif /* __mem_pci */ | 226 | #endif /* __mem_pci */ |
227 | 227 | ||
228 | /* | 228 | /* |
229 | * If this architecture has ISA IO, then define the isa_read/isa_write | ||
230 | * macros. | ||
231 | */ | ||
232 | #ifdef __mem_isa | ||
233 | |||
234 | #define isa_readb(addr) __raw_readb(__mem_isa(addr)) | ||
235 | #define isa_readw(addr) __raw_readw(__mem_isa(addr)) | ||
236 | #define isa_readl(addr) __raw_readl(__mem_isa(addr)) | ||
237 | #define isa_writeb(val,addr) __raw_writeb(val,__mem_isa(addr)) | ||
238 | #define isa_writew(val,addr) __raw_writew(val,__mem_isa(addr)) | ||
239 | #define isa_writel(val,addr) __raw_writel(val,__mem_isa(addr)) | ||
240 | #define isa_memset_io(a,b,c) _memset_io(__mem_isa(a),(b),(c)) | ||
241 | #define isa_memcpy_fromio(a,b,c) _memcpy_fromio((a),__mem_isa(b),(c)) | ||
242 | #define isa_memcpy_toio(a,b,c) _memcpy_toio(__mem_isa((a)),(b),(c)) | ||
243 | |||
244 | #define isa_eth_io_copy_and_sum(a,b,c,d) \ | ||
245 | eth_copy_and_sum((a),__mem_isa(b),(c),(d)) | ||
246 | |||
247 | #else /* __mem_isa */ | ||
248 | |||
249 | #define isa_readb(addr) (__readwrite_bug("isa_readb"),0) | ||
250 | #define isa_readw(addr) (__readwrite_bug("isa_readw"),0) | ||
251 | #define isa_readl(addr) (__readwrite_bug("isa_readl"),0) | ||
252 | #define isa_writeb(val,addr) __readwrite_bug("isa_writeb") | ||
253 | #define isa_writew(val,addr) __readwrite_bug("isa_writew") | ||
254 | #define isa_writel(val,addr) __readwrite_bug("isa_writel") | ||
255 | #define isa_memset_io(a,b,c) __readwrite_bug("isa_memset_io") | ||
256 | #define isa_memcpy_fromio(a,b,c) __readwrite_bug("isa_memcpy_fromio") | ||
257 | #define isa_memcpy_toio(a,b,c) __readwrite_bug("isa_memcpy_toio") | ||
258 | |||
259 | #define isa_eth_io_copy_and_sum(a,b,c,d) \ | ||
260 | __readwrite_bug("isa_eth_io_copy_and_sum") | ||
261 | |||
262 | #endif /* __mem_isa */ | ||
263 | |||
264 | /* | ||
265 | * ioremap and friends. | 229 | * ioremap and friends. |
266 | * | 230 | * |
267 | * ioremap takes a PCI memory address, as specified in | 231 | * ioremap takes a PCI memory address, as specified in |
diff --git a/include/asm-i386/io.h b/include/asm-i386/io.h index 03233c2ab820..79670bb4b0c7 100644 --- a/include/asm-i386/io.h +++ b/include/asm-i386/io.h | |||
@@ -219,23 +219,11 @@ static inline void memcpy_toio(volatile void __iomem *dst, const void *src, int | |||
219 | */ | 219 | */ |
220 | #define __ISA_IO_base ((char __iomem *)(PAGE_OFFSET)) | 220 | #define __ISA_IO_base ((char __iomem *)(PAGE_OFFSET)) |
221 | 221 | ||
222 | #define isa_readb(a) readb(__ISA_IO_base + (a)) | ||
223 | #define isa_readw(a) readw(__ISA_IO_base + (a)) | ||
224 | #define isa_readl(a) readl(__ISA_IO_base + (a)) | ||
225 | #define isa_writeb(b,a) writeb(b,__ISA_IO_base + (a)) | ||
226 | #define isa_writew(w,a) writew(w,__ISA_IO_base + (a)) | ||
227 | #define isa_writel(l,a) writel(l,__ISA_IO_base + (a)) | ||
228 | #define isa_memset_io(a,b,c) memset_io(__ISA_IO_base + (a),(b),(c)) | ||
229 | #define isa_memcpy_fromio(a,b,c) memcpy_fromio((a),__ISA_IO_base + (b),(c)) | ||
230 | #define isa_memcpy_toio(a,b,c) memcpy_toio(__ISA_IO_base + (a),(b),(c)) | ||
231 | |||
232 | |||
233 | /* | 222 | /* |
234 | * Again, i386 does not require mem IO specific function. | 223 | * Again, i386 does not require mem IO specific function. |
235 | */ | 224 | */ |
236 | 225 | ||
237 | #define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void __force *)(b),(c),(d)) | 226 | #define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void __force *)(b),(c),(d)) |
238 | #define isa_eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void __force *)(__ISA_IO_base + (b)),(c),(d)) | ||
239 | 227 | ||
240 | /** | 228 | /** |
241 | * check_signature - find BIOS signatures | 229 | * check_signature - find BIOS signatures |
diff --git a/include/asm-mips/io.h b/include/asm-mips/io.h index 546a17e56a9b..6b17eb9d79a5 100644 --- a/include/asm-mips/io.h +++ b/include/asm-mips/io.h | |||
@@ -556,24 +556,11 @@ extern void pci_iounmap(struct pci_dev *dev, void __iomem *); | |||
556 | */ | 556 | */ |
557 | #define __ISA_IO_base ((char *)(isa_slot_offset)) | 557 | #define __ISA_IO_base ((char *)(isa_slot_offset)) |
558 | 558 | ||
559 | #define isa_readb(a) readb(__ISA_IO_base + (a)) | ||
560 | #define isa_readw(a) readw(__ISA_IO_base + (a)) | ||
561 | #define isa_readl(a) readl(__ISA_IO_base + (a)) | ||
562 | #define isa_readq(a) readq(__ISA_IO_base + (a)) | ||
563 | #define isa_writeb(b,a) writeb(b,__ISA_IO_base + (a)) | ||
564 | #define isa_writew(w,a) writew(w,__ISA_IO_base + (a)) | ||
565 | #define isa_writel(l,a) writel(l,__ISA_IO_base + (a)) | ||
566 | #define isa_writeq(q,a) writeq(q,__ISA_IO_base + (a)) | ||
567 | #define isa_memset_io(a,b,c) memset_io(__ISA_IO_base + (a),(b),(c)) | ||
568 | #define isa_memcpy_fromio(a,b,c) memcpy_fromio((a),__ISA_IO_base + (b),(c)) | ||
569 | #define isa_memcpy_toio(a,b,c) memcpy_toio(__ISA_IO_base + (a),(b),(c)) | ||
570 | |||
571 | /* | 559 | /* |
572 | * We don't have csum_partial_copy_fromio() yet, so we cheat here and | 560 | * We don't have csum_partial_copy_fromio() yet, so we cheat here and |
573 | * just copy it. The net code will then do the checksum later. | 561 | * just copy it. The net code will then do the checksum later. |
574 | */ | 562 | */ |
575 | #define eth_io_copy_and_sum(skb,src,len,unused) memcpy_fromio((skb)->data,(src),(len)) | 563 | #define eth_io_copy_and_sum(skb,src,len,unused) memcpy_fromio((skb)->data,(src),(len)) |
576 | #define isa_eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(b),(c),(d)) | ||
577 | 564 | ||
578 | /* | 565 | /* |
579 | * check_signature - find BIOS signatures | 566 | * check_signature - find BIOS signatures |
diff --git a/include/asm-parisc/io.h b/include/asm-parisc/io.h index 0db00adc942a..be0c7234a6da 100644 --- a/include/asm-parisc/io.h +++ b/include/asm-parisc/io.h | |||
@@ -294,22 +294,6 @@ void memset_io(volatile void __iomem *addr, unsigned char val, int count); | |||
294 | void memcpy_fromio(void *dst, const volatile void __iomem *src, int count); | 294 | void memcpy_fromio(void *dst, const volatile void __iomem *src, int count); |
295 | void memcpy_toio(volatile void __iomem *dst, const void *src, int count); | 295 | void memcpy_toio(volatile void __iomem *dst, const void *src, int count); |
296 | 296 | ||
297 | /* Support old drivers which don't ioremap. | ||
298 | * NB this interface is scheduled to disappear in 2.5 | ||
299 | */ | ||
300 | |||
301 | #define __isa_addr(x) (void __iomem *)(F_EXTEND(0xfc000000) | (x)) | ||
302 | #define isa_readb(a) readb(__isa_addr(a)) | ||
303 | #define isa_readw(a) readw(__isa_addr(a)) | ||
304 | #define isa_readl(a) readl(__isa_addr(a)) | ||
305 | #define isa_writeb(b,a) writeb((b), __isa_addr(a)) | ||
306 | #define isa_writew(b,a) writew((b), __isa_addr(a)) | ||
307 | #define isa_writel(b,a) writel((b), __isa_addr(a)) | ||
308 | #define isa_memset_io(a,b,c) memset_io(__isa_addr(a), (b), (c)) | ||
309 | #define isa_memcpy_fromio(a,b,c) memcpy_fromio((a), __isa_addr(b), (c)) | ||
310 | #define isa_memcpy_toio(a,b,c) memcpy_toio(__isa_addr(a), (b), (c)) | ||
311 | |||
312 | |||
313 | /* | 297 | /* |
314 | * XXX - We don't have csum_partial_copy_fromio() yet, so we cheat here and | 298 | * XXX - We don't have csum_partial_copy_fromio() yet, so we cheat here and |
315 | * just copy it. The net code will then do the checksum later. Presently | 299 | * just copy it. The net code will then do the checksum later. Presently |
@@ -318,8 +302,6 @@ void memcpy_toio(volatile void __iomem *dst, const void *src, int count); | |||
318 | 302 | ||
319 | #define eth_io_copy_and_sum(skb,src,len,unused) \ | 303 | #define eth_io_copy_and_sum(skb,src,len,unused) \ |
320 | memcpy_fromio((skb)->data,(src),(len)) | 304 | memcpy_fromio((skb)->data,(src),(len)) |
321 | #define isa_eth_io_copy_and_sum(skb,src,len,unused) \ | ||
322 | isa_memcpy_fromio((skb)->data,(src),(len)) | ||
323 | 305 | ||
324 | /* Port-space IO */ | 306 | /* Port-space IO */ |
325 | 307 | ||
diff --git a/include/asm-sh/io.h b/include/asm-sh/io.h index b0b2937b6f83..2c3afe71323d 100644 --- a/include/asm-sh/io.h +++ b/include/asm-sh/io.h | |||
@@ -174,20 +174,6 @@ static inline void __set_io_port_base(unsigned long pbase) | |||
174 | generic_io_base = pbase; | 174 | generic_io_base = pbase; |
175 | } | 175 | } |
176 | 176 | ||
177 | #define isa_readb(a) readb(ioport_map(a, 1)) | ||
178 | #define isa_readw(a) readw(ioport_map(a, 2)) | ||
179 | #define isa_readl(a) readl(ioport_map(a, 4)) | ||
180 | #define isa_writeb(b,a) writeb(b,ioport_map(a, 1)) | ||
181 | #define isa_writew(w,a) writew(w,ioport_map(a, 2)) | ||
182 | #define isa_writel(l,a) writel(l,ioport_map(a, 4)) | ||
183 | |||
184 | #define isa_memset_io(a,b,c) \ | ||
185 | memset((void *)(ioport_map((unsigned long)(a), 1)),(b),(c)) | ||
186 | #define isa_memcpy_fromio(a,b,c) \ | ||
187 | memcpy((a),(void *)(ioport_map((unsigned long)(b), 1)),(c)) | ||
188 | #define isa_memcpy_toio(a,b,c) \ | ||
189 | memcpy((void *)(ioport_map((unsigned long)(a), 1)),(b),(c)) | ||
190 | |||
191 | /* We really want to try and get these to memcpy etc */ | 177 | /* We really want to try and get these to memcpy etc */ |
192 | extern void memcpy_fromio(void *, volatile void __iomem *, unsigned long); | 178 | extern void memcpy_fromio(void *, volatile void __iomem *, unsigned long); |
193 | extern void memcpy_toio(volatile void __iomem *, const void *, unsigned long); | 179 | extern void memcpy_toio(volatile void __iomem *, const void *, unsigned long); |
diff --git a/include/asm-x86_64/io.h b/include/asm-x86_64/io.h index 9dac18db8291..a85fe8370820 100644 --- a/include/asm-x86_64/io.h +++ b/include/asm-x86_64/io.h | |||
@@ -269,23 +269,11 @@ void memset_io(volatile void __iomem *a, int b, size_t c); | |||
269 | */ | 269 | */ |
270 | #define __ISA_IO_base ((char __iomem *)(PAGE_OFFSET)) | 270 | #define __ISA_IO_base ((char __iomem *)(PAGE_OFFSET)) |
271 | 271 | ||
272 | #define isa_readb(a) readb(__ISA_IO_base + (a)) | ||
273 | #define isa_readw(a) readw(__ISA_IO_base + (a)) | ||
274 | #define isa_readl(a) readl(__ISA_IO_base + (a)) | ||
275 | #define isa_writeb(b,a) writeb(b,__ISA_IO_base + (a)) | ||
276 | #define isa_writew(w,a) writew(w,__ISA_IO_base + (a)) | ||
277 | #define isa_writel(l,a) writel(l,__ISA_IO_base + (a)) | ||
278 | #define isa_memset_io(a,b,c) memset_io(__ISA_IO_base + (a),(b),(c)) | ||
279 | #define isa_memcpy_fromio(a,b,c) memcpy_fromio((a),__ISA_IO_base + (b),(c)) | ||
280 | #define isa_memcpy_toio(a,b,c) memcpy_toio(__ISA_IO_base + (a),(b),(c)) | ||
281 | |||
282 | |||
283 | /* | 272 | /* |
284 | * Again, x86-64 does not require mem IO specific function. | 273 | * Again, x86-64 does not require mem IO specific function. |
285 | */ | 274 | */ |
286 | 275 | ||
287 | #define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void *)(b),(c),(d)) | 276 | #define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void *)(b),(c),(d)) |
288 | #define isa_eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void *)(__ISA_IO_base + (b)),(c),(d)) | ||
289 | 277 | ||
290 | /** | 278 | /** |
291 | * check_signature - find BIOS signatures | 279 | * check_signature - find BIOS signatures |