]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - include/asm-arm/arch-ebsa110/io.h
[ARM] 1/4: Move include of asm/hardware.h to asm-arm/arch-*/io.h
[karo-tx-linux.git] / include / asm-arm / arch-ebsa110 / io.h
1 /*
2  *  linux/include/asm-arm/arch-ebsa110/io.h
3  *
4  *  Copyright (C) 1997,1998 Russell King
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  * Modifications:
11  *  06-Dec-1997 RMK     Created.
12  */
13 #ifndef __ASM_ARM_ARCH_IO_H
14 #define __ASM_ARM_ARCH_IO_H
15
16 #include <asm/hardware.h>
17
18 #define IO_SPACE_LIMIT 0xffff
19
20 u8 __inb8(unsigned int port);
21 void __outb8(u8  val, unsigned int port);
22
23 u8 __inb16(unsigned int port);
24 void __outb16(u8  val, unsigned int port);
25
26 u16 __inw(unsigned int port);
27 void __outw(u16 val, unsigned int port);
28
29 u32 __inl(unsigned int port);
30 void __outl(u32 val, unsigned int port);
31
32 u8  __readb(void __iomem *addr);
33 u16 __readw(void __iomem *addr);
34 u32 __readl(void __iomem *addr);
35
36 void __writeb(u8  val, void __iomem *addr);
37 void __writew(u16 val, void __iomem *addr);
38 void __writel(u32 val, void __iomem *addr);
39
40 /*
41  * Argh, someone forgot the IOCS16 line.  We therefore have to handle
42  * the byte stearing by selecting the correct byte IO functions here.
43  */
44 #ifdef ISA_SIXTEEN_BIT_PERIPHERAL
45 #define inb(p)                  __inb16(p)
46 #define outb(v,p)               __outb16(v,p)
47 #else
48 #define inb(p)                  __inb8(p)
49 #define outb(v,p)               __outb8(v,p)
50 #endif
51
52 #define inw(p)                  __inw(p)
53 #define outw(v,p)               __outw(v,p)
54
55 #define inl(p)                  __inl(p)
56 #define outl(v,p)               __outl(v,p)
57
58 #define readb(b)                __readb(b)
59 #define readw(b)                __readw(b)
60 #define readl(b)                __readl(b)
61 #define readb_relaxed(addr)     readb(addr)
62 #define readw_relaxed(addr)     readw(addr)
63 #define readl_relaxed(addr)     readl(addr)
64
65 #define writeb(v,b)             __writeb(v,b)
66 #define writew(v,b)             __writew(v,b)
67 #define writel(v,b)             __writel(v,b)
68
69 #define __arch_ioremap(cookie,sz,c,a)   ((void __iomem *)(cookie))
70 #define __arch_iounmap(cookie)          do { } while (0)
71
72 extern void insb(unsigned int port, void *buf, int sz);
73 extern void insw(unsigned int port, void *buf, int sz);
74 extern void insl(unsigned int port, void *buf, int sz);
75
76 extern void outsb(unsigned int port, const void *buf, int sz);
77 extern void outsw(unsigned int port, const void *buf, int sz);
78 extern void outsl(unsigned int port, const void *buf, int sz);
79
80 #endif