diff options
author | Paul Burton <paul.burton@imgtec.com> | 2014-03-24 06:19:34 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-03-31 12:17:13 -0400 |
commit | cd217546602dbfe96c3f8e8025eb750fadf1ab4f (patch) | |
tree | dc34f45668bf59f3c674a8dc868971bf59bdfe3a | |
parent | b966087b5145e044b033ea6bb6c16a3b5dc4c48e (diff) |
MIPS: CM: use __raw_ memory access functions
The CM registers use native endianness, so using plain readl & writel
will produce incorrect results on big endian systems.
Reported-by: Jeffrey Deans <jeffrey.deans@imgtec.com>
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6656/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/include/asm/mips-cm.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/include/asm/mips-cm.h b/arch/mips/include/asm/mips-cm.h index 12cae5e294c4..6a9d2dd005ca 100644 --- a/arch/mips/include/asm/mips-cm.h +++ b/arch/mips/include/asm/mips-cm.h | |||
@@ -96,13 +96,13 @@ static inline u32 *addr_gcr_##name(void) \ | |||
96 | \ | 96 | \ |
97 | static inline u32 read_gcr_##name(void) \ | 97 | static inline u32 read_gcr_##name(void) \ |
98 | { \ | 98 | { \ |
99 | return readl(addr_gcr_##name()); \ | 99 | return __raw_readl(addr_gcr_##name()); \ |
100 | } | 100 | } |
101 | 101 | ||
102 | #define BUILD_CM__W(name, off) \ | 102 | #define BUILD_CM__W(name, off) \ |
103 | static inline void write_gcr_##name(u32 value) \ | 103 | static inline void write_gcr_##name(u32 value) \ |
104 | { \ | 104 | { \ |
105 | writel(value, addr_gcr_##name()); \ | 105 | __raw_writel(value, addr_gcr_##name()); \ |
106 | } | 106 | } |
107 | 107 | ||
108 | #define BUILD_CM_RW(name, off) \ | 108 | #define BUILD_CM_RW(name, off) \ |