Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2c1a2a3441a754a9b5a8e7184071154f8a9bd61b
Commit:     2c1a2a3441a754a9b5a8e7184071154f8a9bd61b
Parent:     d80e2bb12606906fd0b5b5592f519852de8b0113
Author:     Haavard Skinnemoen <[EMAIL PROTECTED]>
AuthorDate: Wed Mar 7 10:40:44 2007 +0100
Committer:  Haavard Skinnemoen <[EMAIL PROTECTED]>
CommitDate: Fri Apr 27 13:44:15 2007 +0200

    [AVR32] Use memcpy/memset in memcpy_{from,to}_io and memset_io
    
    Using readb/writeb to implement these breaks NOR flash support. I
    can't see any reason why regular memcpy and memset shouldn't work.
    
    Signed-off-by: Haavard Skinnemoen <[EMAIL PROTECTED]>
---
 include/asm-avr32/io.h |   17 +++--------------
 1 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/include/asm-avr32/io.h b/include/asm-avr32/io.h
index 27b1523..e30d4b3 100644
--- a/include/asm-avr32/io.h
+++ b/include/asm-avr32/io.h
@@ -240,30 +240,19 @@ BUILDSTRING(l, u32)
 static inline void memcpy_fromio(void * to, const volatile void __iomem *from,
                                 unsigned long count)
 {
-       char *p = to;
-       volatile const char __iomem *addr = from;
-
-       while (count--)
-               *p++ = readb(addr++);
+       memcpy(to, (const void __force *)from, count);
 }
 
 static inline void  memcpy_toio(volatile void __iomem *to, const void * from,
                                unsigned long count)
 {
-       const char *p = from;
-       volatile char __iomem *addr = to;
-
-       while (count--)
-               writeb(*p++, addr++);
+       memcpy((void __force *)to, from, count);
 }
 
 static inline void memset_io(volatile void __iomem *addr, unsigned char val,
                             unsigned long count)
 {
-       volatile char __iomem *p = addr;
-
-       while (count--)
-               writeb(val, p++);
+       memset((void __force *)addr, val, count);
 }
 
 #define IO_SPACE_LIMIT 0xffffffff
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to