diff options
Diffstat (limited to 'include/asm-sparc64')
-rw-r--r-- | include/asm-sparc64/io.h | 47 |
1 files changed, 35 insertions, 12 deletions
diff --git a/include/asm-sparc64/io.h b/include/asm-sparc64/io.h index afdcea90707a..0056770e83ad 100644 --- a/include/asm-sparc64/io.h +++ b/include/asm-sparc64/io.h | |||
@@ -100,18 +100,41 @@ static __inline__ void _outl(u32 l, unsigned long addr) | |||
100 | #define inl_p(__addr) inl(__addr) | 100 | #define inl_p(__addr) inl(__addr) |
101 | #define outl_p(__l, __addr) outl(__l, __addr) | 101 | #define outl_p(__l, __addr) outl(__l, __addr) |
102 | 102 | ||
103 | extern void outsb(void __iomem *addr, const void *src, unsigned long count); | 103 | extern void outsb(unsigned long, const void *, unsigned long); |
104 | extern void outsw(void __iomem *addr, const void *src, unsigned long count); | 104 | extern void outsw(unsigned long, const void *, unsigned long); |
105 | extern void outsl(void __iomem *addr, const void *src, unsigned long count); | 105 | extern void outsl(unsigned long, const void *, unsigned long); |
106 | extern void insb(void __iomem *addr, void *dst, unsigned long count); | 106 | extern void insb(unsigned long, void *, unsigned long); |
107 | extern void insw(void __iomem *addr, void *dst, unsigned long count); | 107 | extern void insw(unsigned long, void *, unsigned long); |
108 | extern void insl(void __iomem *addr, void *dst, unsigned long count); | 108 | extern void insl(unsigned long, void *, unsigned long); |
109 | #define ioread8_rep(a,d,c) insb(a,d,c) | 109 | |
110 | #define ioread16_rep(a,d,c) insw(a,d,c) | 110 | static inline void ioread8_rep(void __iomem *port, void *buf, unsigned long count) |
111 | #define ioread32_rep(a,d,c) insl(a,d,c) | 111 | { |
112 | #define iowrite8_rep(a,s,c) outsb(a,s,c) | 112 | insb((unsigned long __force)port, buf, count); |
113 | #define iowrite16_rep(a,s,c) outsw(a,s,c) | 113 | } |
114 | #define iowrite32_rep(a,s,c) outsl(a,s,c) | 114 | static inline void ioread16_rep(void __iomem *port, void *buf, unsigned long count) |
115 | { | ||
116 | insw((unsigned long __force)port, buf, count); | ||
117 | } | ||
118 | |||
119 | static inline void ioread32_rep(void __iomem *port, void *buf, unsigned long count) | ||
120 | { | ||
121 | insl((unsigned long __force)port, buf, count); | ||
122 | } | ||
123 | |||
124 | static inline void iowrite8_rep(void __iomem *port, const void *buf, unsigned long count) | ||
125 | { | ||
126 | outsb((unsigned long __force)port, buf, count); | ||
127 | } | ||
128 | |||
129 | static inline void iowrite16_rep(void __iomem *port, const void *buf, unsigned long count) | ||
130 | { | ||
131 | outsw((unsigned long __force)port, buf, count); | ||
132 | } | ||
133 | |||
134 | static inline void iowrite32_rep(void __iomem *port, const void *buf, unsigned long count) | ||
135 | { | ||
136 | outsl((unsigned long __force)port, buf, count); | ||
137 | } | ||
115 | 138 | ||
116 | /* Memory functions, same as I/O accesses on Ultra. */ | 139 | /* Memory functions, same as I/O accesses on Ultra. */ |
117 | static inline u8 _readb(const volatile void __iomem *addr) | 140 | static inline u8 _readb(const volatile void __iomem *addr) |