diff options
author | Jesper Nilsson <jesper.nilsson@axis.com> | 2008-01-29 04:43:05 -0500 |
---|---|---|
committer | Jesper Nilsson <jesper.nilsson@axis.com> | 2008-02-08 05:06:39 -0500 |
commit | 1791f539cd441c3f7926f2c449487af2b95466a1 (patch) | |
tree | e2ac6eae7bf31074a40d279080190e9bb96c5fdf /include/asm-cris | |
parent | b8ed6b4d833360fa7ba8635ad0c8d8bba5386e0e (diff) |
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.
Diffstat (limited to 'include/asm-cris')
-rw-r--r-- | include/asm-cris/arch-v32/hwregs/reg_rdwr.h | 10 |
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 44e60233c68f..236f91efe7e8 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 @@ | |||
1 | /* $Id: reg_rdwr.h,v 1.6 2005/04/24 18:30:58 starvik Exp $ | 1 | /* |
2 | * | ||
3 | * Read/write register macros used by *_defs.h | 2 | * Read/write register macros used by *_defs.h |
4 | */ | 3 | */ |
5 | 4 | ||
6 | #ifndef reg_rdwr_h | 5 | #ifndef reg_rdwr_h |
7 | #define reg_rdwr_h | 6 | #define reg_rdwr_h |
8 | 7 | ||
8 | #ifndef REG_READ | ||
9 | #define REG_READ(type, addr) (*((volatile type *) (addr))) | ||
10 | #endif | ||
9 | 11 | ||
10 | #define REG_READ(type, addr) *((volatile type *) (addr)) | 12 | #ifndef REG_WRITE |
11 | |||
12 | #define REG_WRITE(type, addr, val) \ | 13 | #define REG_WRITE(type, addr, val) \ |
13 | do { *((volatile type *) (addr)) = (val); } while(0) | 14 | do { *((volatile type *) (addr)) = (val); } while(0) |
15 | #endif | ||
14 | 16 | ||
15 | #endif | 17 | #endif |