Commit cd217546 authored by Paul Burton's avatar Paul Burton Committed by Ralf Baechle

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: default avatarJeffrey Deans <jeffrey.deans@imgtec.com>
Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6656/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent b966087b
...@@ -96,13 +96,13 @@ static inline u32 *addr_gcr_##name(void) \ ...@@ -96,13 +96,13 @@ static inline u32 *addr_gcr_##name(void) \
\ \
static inline u32 read_gcr_##name(void) \ static inline u32 read_gcr_##name(void) \
{ \ { \
return readl(addr_gcr_##name()); \ return __raw_readl(addr_gcr_##name()); \
} }
#define BUILD_CM__W(name, off) \ #define BUILD_CM__W(name, off) \
static inline void write_gcr_##name(u32 value) \ static inline void write_gcr_##name(u32 value) \
{ \ { \
writel(value, addr_gcr_##name()); \ __raw_writel(value, addr_gcr_##name()); \
} }
#define BUILD_CM_RW(name, off) \ #define BUILD_CM_RW(name, off) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment