summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHeiko Schocher <hs@pollux.denx.de>2006-04-20 12:38:41 +0200
committerHeiko Schocher <hs@pollux.denx.de>2006-04-20 12:38:41 +0200
commit60e270a4903b3379d6859418d99aeef1d0d0cdff (patch)
tree48a033782d7f641ffd75f2be076da5b8d513254e /include
parent9acb626fc145e7327f94fd77f927dce08dd978a8 (diff)
downloadu-boot-imx-60e270a4903b3379d6859418d99aeef1d0d0cdff.zip
u-boot-imx-60e270a4903b3379d6859418d99aeef1d0d0cdff.tar.gz
u-boot-imx-60e270a4903b3379d6859418d99aeef1d0d0cdff.tar.bz2
Fix I/O Macros and mini-app stubs for Nios-II
Patch by Scott McNutt 11, Aug 2005 -Fix asm/io.h macros -Eliminate use of CACHE_BYPASS in cpu code -Eliminate assembler warnings -Fix mini-app stubs and force no small data
Diffstat (limited to 'include')
-rw-r--r--include/asm-nios2/io.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/asm-nios2/io.h b/include/asm-nios2/io.h
index b16a988..0fab53b 100644
--- a/include/asm-nios2/io.h
+++ b/include/asm-nios2/io.h
@@ -39,12 +39,13 @@ extern unsigned inl (unsigned port);
#define readl(addr)\
({unsigned long val;\
asm volatile( "ldwio %0, 0(%1)" :"=r"(val) : "r" (addr)); val;})
+
#define writeb(addr,val)\
- asm volatile ("stbio %0, 0(%1)" : : "r" (addr), "r" (val))
+ asm volatile ("stbio %1, 0(%0)" : : "r" (addr), "r" (val))
#define writew(addr,val)\
- asm volatile ("sthio %0, 0(%1)" : : "r" (addr), "r" (val))
+ asm volatile ("sthio %1, 0(%0)" : : "r" (addr), "r" (val))
#define writel(addr,val)\
- asm volatile ("stwio %0, 0(%1)" : : "r" (addr), "r" (val))
+ asm volatile ("stwio %1, 0(%0)" : : "r" (addr), "r" (val))
#define inb(addr) readb(addr)
#define inw(addr) readw(addr)