aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-frv/io.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-frv/io.h')
-rw-r--r--include/asm-frv/io.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/include/asm-frv/io.h b/include/asm-frv/io.h
index b56eba59e3cd..f49398a82977 100644
--- a/include/asm-frv/io.h
+++ b/include/asm-frv/io.h
@@ -40,13 +40,13 @@ static inline unsigned long _swapl(unsigned long v)
40//#define __iormb() asm volatile("membar") 40//#define __iormb() asm volatile("membar")
41//#define __iowmb() asm volatile("membar") 41//#define __iowmb() asm volatile("membar")
42 42
43#define __raw_readb(addr) __builtin_read8((void *) (addr)) 43#define __raw_readb __builtin_read8
44#define __raw_readw(addr) __builtin_read16((void *) (addr)) 44#define __raw_readw __builtin_read16
45#define __raw_readl(addr) __builtin_read32((void *) (addr)) 45#define __raw_readl __builtin_read32
46 46
47#define __raw_writeb(datum, addr) __builtin_write8((void *) (addr), datum) 47#define __raw_writeb(datum, addr) __builtin_write8(addr, datum)
48#define __raw_writew(datum, addr) __builtin_write16((void *) (addr), datum) 48#define __raw_writew(datum, addr) __builtin_write16(addr, datum)
49#define __raw_writel(datum, addr) __builtin_write32((void *) (addr), datum) 49#define __raw_writel(datum, addr) __builtin_write32(addr, datum)
50 50
51static inline void io_outsb(unsigned int addr, const void *buf, int len) 51static inline void io_outsb(unsigned int addr, const void *buf, int len)
52{ 52{
@@ -128,12 +128,12 @@ static inline void memcpy_toio(volatile void __iomem *dst, const void *src, int
128 128
129static inline uint8_t inb(unsigned long addr) 129static inline uint8_t inb(unsigned long addr)
130{ 130{
131 return __builtin_read8((void *)addr); 131 return __builtin_read8((void __iomem *)addr);
132} 132}
133 133
134static inline uint16_t inw(unsigned long addr) 134static inline uint16_t inw(unsigned long addr)
135{ 135{
136 uint16_t ret = __builtin_read16((void *)addr); 136 uint16_t ret = __builtin_read16((void __iomem *)addr);
137 137
138 if (__is_PCI_IO(addr)) 138 if (__is_PCI_IO(addr))
139 ret = _swapw(ret); 139 ret = _swapw(ret);
@@ -143,7 +143,7 @@ static inline uint16_t inw(unsigned long addr)
143 143
144static inline uint32_t inl(unsigned long addr) 144static inline uint32_t inl(unsigned long addr)
145{ 145{
146 uint32_t ret = __builtin_read32((void *)addr); 146 uint32_t ret = __builtin_read32((void __iomem *)addr);
147 147
148 if (__is_PCI_IO(addr)) 148 if (__is_PCI_IO(addr))
149 ret = _swapl(ret); 149 ret = _swapl(ret);
@@ -153,21 +153,21 @@ static inline uint32_t inl(unsigned long addr)
153 153
154static inline void outb(uint8_t datum, unsigned long addr) 154static inline void outb(uint8_t datum, unsigned long addr)
155{ 155{
156 __builtin_write8((void *)addr, datum); 156 __builtin_write8((void __iomem *)addr, datum);
157} 157}
158 158
159static inline void outw(uint16_t datum, unsigned long addr) 159static inline void outw(uint16_t datum, unsigned long addr)
160{ 160{
161 if (__is_PCI_IO(addr)) 161 if (__is_PCI_IO(addr))
162 datum = _swapw(datum); 162 datum = _swapw(datum);
163 __builtin_write16((void *)addr, datum); 163 __builtin_write16((void __iomem *)addr, datum);
164} 164}
165 165
166static inline void outl(uint32_t datum, unsigned long addr) 166static inline void outl(uint32_t datum, unsigned long addr)
167{ 167{
168 if (__is_PCI_IO(addr)) 168 if (__is_PCI_IO(addr))
169 datum = _swapl(datum); 169 datum = _swapl(datum);
170 __builtin_write32((void *)addr, datum); 170 __builtin_write32((void __iomem *)addr, datum);
171} 171}
172 172
173#define inb_p(addr) inb(addr) 173#define inb_p(addr) inb(addr)
@@ -189,12 +189,12 @@ static inline void outl(uint32_t datum, unsigned long addr)
189 189
190static inline uint8_t readb(const volatile void __iomem *addr) 190static inline uint8_t readb(const volatile void __iomem *addr)
191{ 191{
192 return __builtin_read8((volatile uint8_t __force *) addr); 192 return __builtin_read8((__force void volatile __iomem *) addr);
193} 193}
194 194
195static inline uint16_t readw(const volatile void __iomem *addr) 195static inline uint16_t readw(const volatile void __iomem *addr)
196{ 196{
197 uint16_t ret = __builtin_read16((volatile uint16_t __force *)addr); 197 uint16_t ret = __builtin_read16((__force void volatile __iomem *)addr);
198 198
199 if (__is_PCI_MEM(addr)) 199 if (__is_PCI_MEM(addr))
200 ret = _swapw(ret); 200 ret = _swapw(ret);
@@ -203,7 +203,7 @@ static inline uint16_t readw(const volatile void __iomem *addr)
203 203
204static inline uint32_t readl(const volatile void __iomem *addr) 204static inline uint32_t readl(const volatile void __iomem *addr)
205{ 205{
206 uint32_t ret = __builtin_read32((volatile uint32_t __force *)addr); 206 uint32_t ret = __builtin_read32((__force void volatile __iomem *)addr);
207 207
208 if (__is_PCI_MEM(addr)) 208 if (__is_PCI_MEM(addr))
209 ret = _swapl(ret); 209 ret = _swapl(ret);
@@ -217,7 +217,7 @@ static inline uint32_t readl(const volatile void __iomem *addr)
217 217
218static inline void writeb(uint8_t datum, volatile void __iomem *addr) 218static inline void writeb(uint8_t datum, volatile void __iomem *addr)
219{ 219{
220 __builtin_write8((volatile uint8_t __force *) addr, datum); 220 __builtin_write8(addr, datum);
221 if (__is_PCI_MEM(addr)) 221 if (__is_PCI_MEM(addr))
222 __flush_PCI_writes(); 222 __flush_PCI_writes();
223} 223}
@@ -227,7 +227,7 @@ static inline void writew(uint16_t datum, volatile void __iomem *addr)
227 if (__is_PCI_MEM(addr)) 227 if (__is_PCI_MEM(addr))
228 datum = _swapw(datum); 228 datum = _swapw(datum);
229 229
230 __builtin_write16((volatile uint16_t __force *) addr, datum); 230 __builtin_write16(addr, datum);
231 if (__is_PCI_MEM(addr)) 231 if (__is_PCI_MEM(addr))
232 __flush_PCI_writes(); 232 __flush_PCI_writes();
233} 233}
@@ -237,7 +237,7 @@ static inline void writel(uint32_t datum, volatile void __iomem *addr)
237 if (__is_PCI_MEM(addr)) 237 if (__is_PCI_MEM(addr))
238 datum = _swapl(datum); 238 datum = _swapl(datum);
239 239
240 __builtin_write32((volatile uint32_t __force *) addr, datum); 240 __builtin_write32(addr, datum);
241 if (__is_PCI_MEM(addr)) 241 if (__is_PCI_MEM(addr))
242 __flush_PCI_writes(); 242 __flush_PCI_writes();
243} 243}
@@ -271,7 +271,7 @@ static inline void __iomem *ioremap_fullcache(unsigned long physaddr, unsigned l
271 return __ioremap(physaddr, size, IOMAP_FULL_CACHING); 271 return __ioremap(physaddr, size, IOMAP_FULL_CACHING);
272} 272}
273 273
274extern void iounmap(void __iomem *addr); 274extern void iounmap(void volatile __iomem *addr);
275 275
276static inline void __iomem *ioport_map(unsigned long port, unsigned int nr) 276static inline void __iomem *ioport_map(unsigned long port, unsigned int nr)
277{ 277{