aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/asm-avr32/io.h17
1 files changed, 3 insertions, 14 deletions
diff --git a/include/asm-avr32/io.h b/include/asm-avr32/io.h
index 27b1523d42e0..e30d4b3bd836 100644
--- a/include/asm-avr32/io.h
+++ b/include/asm-avr32/io.h
@@ -240,30 +240,19 @@ BUILDSTRING(l, u32)
240static inline void memcpy_fromio(void * to, const volatile void __iomem *from, 240static inline void memcpy_fromio(void * to, const volatile void __iomem *from,
241 unsigned long count) 241 unsigned long count)
242{ 242{
243 char *p = to; 243 memcpy(to, (const void __force *)from, count);
244 volatile const char __iomem *addr = from;
245
246 while (count--)
247 *p++ = readb(addr++);
248} 244}
249 245
250static inline void memcpy_toio(volatile void __iomem *to, const void * from, 246static inline void memcpy_toio(volatile void __iomem *to, const void * from,
251 unsigned long count) 247 unsigned long count)
252{ 248{
253 const char *p = from; 249 memcpy((void __force *)to, from, count);
254 volatile char __iomem *addr = to;
255
256 while (count--)
257 writeb(*p++, addr++);
258} 250}
259 251
260static inline void memset_io(volatile void __iomem *addr, unsigned char val, 252static inline void memset_io(volatile void __iomem *addr, unsigned char val,
261 unsigned long count) 253 unsigned long count)
262{ 254{
263 volatile char __iomem *p = addr; 255 memset((void __force *)addr, val, count);
264
265 while (count--)
266 writeb(val, p++);
267} 256}
268 257
269#define IO_SPACE_LIMIT 0xffffffff 258#define IO_SPACE_LIMIT 0xffffffff