summaryrefslogtreecommitdiff
path: root/include/asm-nios
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-nios')
-rw-r--r--include/asm-nios/io.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/asm-nios/io.h b/include/asm-nios/io.h
index d77695a..08e46a3 100644
--- a/include/asm-nios/io.h
+++ b/include/asm-nios/io.h
@@ -23,6 +23,14 @@
#ifndef __ASM_NIOS_IO_H_
#define __ASM_NIOS_IO_H_
+#define __raw_writeb(v,a) (*(volatile unsigned char *)(a) = (v))
+#define __raw_writew(v,a) (*(volatile unsigned short *)(a) = (v))
+#define __raw_writel(v,a) (*(volatile unsigned int *)(a) = (v))
+
+#define __raw_readb(a) (*(volatile unsigned char *)(a))
+#define __raw_readw(a) (*(volatile unsigned short *)(a))
+#define __raw_readl(a) (*(volatile unsigned int *)(a))
+
#define readb(addr)\
({unsigned char val;\
asm volatile( " pfxio 0 \n"\