kernel-ark/include/asm-cris/arch-v32/hwregs/reg_rdwr.h
Jesper Nilsson 1791f539cd CRIS v32: Minor changes to avoid errors in asm-cris/arch-v32/hwregs/reg_rdwr.h
- Add ifdef around macros to read and write hardware registers
- Add parens around REG_READ expression to avoid possible precedence errors.
- Remove useless CVS id tag.
2008-02-08 11:06:39 +01:00

18 lines
304 B
C

/*
* 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
#ifndef REG_WRITE
#define REG_WRITE(type, addr, val) \
do { *((volatile type *) (addr)) = (val); } while(0)
#endif
#endif