aboutsummaryrefslogtreecommitdiff
path: root/include/asm-cris/arch-v32/hwregs/reg_rdwr.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-cris/arch-v32/hwregs/reg_rdwr.h')
-rw-r--r--include/asm-cris/arch-v32/hwregs/reg_rdwr.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/asm-cris/arch-v32/hwregs/reg_rdwr.h b/include/asm-cris/arch-v32/hwregs/reg_rdwr.h
index 44e60233c68..236f91efe7e 100644
--- a/include/asm-cris/arch-v32/hwregs/reg_rdwr.h
+++ b/include/asm-cris/arch-v32/hwregs/reg_rdwr.h
@@ -1,15 +1,17 @@
-/* $Id: reg_rdwr.h,v 1.6 2005/04/24 18:30:58 starvik Exp $
- *
+/*
* Read/write register macros used by *_defs.h
*/
#ifndef reg_rdwr_h
#define reg_rdwr_h
+#ifndef REG_READ
+#define REG_READ(type, addr) (*((volatile type *) (addr)))
+#endif
-#define REG_READ(type, addr) *((volatile type *) (addr))
-
+#ifndef REG_WRITE
#define REG_WRITE(type, addr, val) \
do { *((volatile type *) (addr)) = (val); } while(0)
+#endif
#endif