diff mbox

[U-Boot,v2,1/2] nios2: add memcpy_fromio and memcpy_toio

Message ID 1446713231-1559-1-git-send-email-thomas@wytron.com.tw
State Accepted, archived
Delegated to: Thomas Chou
Headers show

Commit Message

Thomas Chou Nov. 5, 2015, 8:47 a.m. UTC
Add memcpy_fromio() and memcpy_toio().

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
---
 arch/nios2/include/asm/io.h | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox

Patch

diff --git a/arch/nios2/include/asm/io.h b/arch/nios2/include/asm/io.h
index 03a3418..95d8801 100644
--- a/arch/nios2/include/asm/io.h
+++ b/arch/nios2/include/asm/io.h
@@ -173,4 +173,8 @@  static inline void outsl (unsigned long port, const void *src, unsigned long cou
 #define setbits_8(addr, set) setbits(8, addr, set)
 #define clrsetbits_8(addr, clear, set) clrsetbits(8, addr, clear, set)
 
+#define memset_io(a, b, c)		memset((void *)(a), (b), (c))
+#define memcpy_fromio(a, b, c)		memcpy((a), (void *)(b), (c))
+#define memcpy_toio(a, b, c)		memcpy((void *)(a), (b), (c))
+
 #endif /* __ASM_NIOS2_IO_H_ */