summaryrefslogtreecommitdiff
path: root/include/asm-nios2
diff options
context:
space:
mode:
authorScott McNutt <smcnutt@psyent.com>2006-06-08 11:59:57 -0400
committerScott McNutt <smcnutt@psyent.com>2006-06-08 11:59:57 -0400
commitc2ced000f4f18361feb36ea257fabbb46913e1d4 (patch)
tree6ba42fa4c9b37b96491846e8e807f351bc5202e1 /include/asm-nios2
parente461a24113c66747510b07930a83b0d84171a559 (diff)
Nios II - Fix I/O Macros and mini-app stubs
-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 Patch by Scott McNutt, 08 Jun 2006
Diffstat (limited to 'include/asm-nios2')
-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 b16a98865ad..0fab53bf0e9 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)