1
2
3
4
5
6
7
8
9
10 #ifndef __ASM_ARM_ARCH_IO_H
11 #define __ASM_ARM_ARCH_IO_H
12
13 u8 __inb8(unsigned int port);
14 void __outb8(u8 val, unsigned int port);
15
16 u8 __inb16(unsigned int port);
17 void __outb16(u8 val, unsigned int port);
18
19 u16 __inw(unsigned int port);
20 void __outw(u16 val, unsigned int port);
21
22 u32 __inl(unsigned int port);
23 void __outl(u32 val, unsigned int port);
24
25 u8 __readb(const volatile void __iomem *addr);
26 u16 __readw(const volatile void __iomem *addr);
27 u32 __readl(const volatile void __iomem *addr);
28
29 void __writeb(u8 val, volatile void __iomem *addr);
30 void __writew(u16 val, volatile void __iomem *addr);
31 void __writel(u32 val, volatile void __iomem *addr);
32
33
34
35
36
37 #ifdef ISA_SIXTEEN_BIT_PERIPHERAL
38 #define inb(p) __inb16(p)
39 #define outb(v,p) __outb16(v,p)
40 #else
41 #define inb(p) __inb8(p)
42 #define outb(v,p) __outb8(v,p)
43 #endif
44
45 #define inw(p) __inw(p)
46 #define outw(v,p) __outw(v,p)
47
48 #define inl(p) __inl(p)
49 #define outl(v,p) __outl(v,p)
50
51 #define readb(b) __readb(b)
52 #define readw(b) __readw(b)
53 #define readl(b) __readl(b)
54 #define readb_relaxed(addr) readb(addr)
55 #define readw_relaxed(addr) readw(addr)
56 #define readl_relaxed(addr) readl(addr)
57
58 #define writeb(v,b) __writeb(v,b)
59 #define writew(v,b) __writew(v,b)
60 #define writel(v,b) __writel(v,b)
61
62 #define insb insb
63 extern void insb(unsigned int port, void *buf, int sz);
64 #define insw insw
65 extern void insw(unsigned int port, void *buf, int sz);
66 #define insl insl
67 extern void insl(unsigned int port, void *buf, int sz);
68
69 #define outsb outsb
70 extern void outsb(unsigned int port, const void *buf, int sz);
71 #define outsw outsw
72 extern void outsw(unsigned int port, const void *buf, int sz);
73 #define outsl outsl
74 extern void outsl(unsigned int port, const void *buf, int sz);
75
76
77 #define writesw writesw
78 extern void writesw(volatile void __iomem *addr, const void *data, int wordlen);
79 #define writesl writesl
80 extern void writesl(volatile void __iomem *addr, const void *data, int longlen);
81
82
83 #define readsw readsw
84 extern void readsw(const volatile void __iomem *addr, void *data, int wordlen);
85
86 #define readsl readsl
87 extern void readsl(const volatile void __iomem *addr, void *data, int longlen);
88
89 #endif