Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9a1724c7 authored by Paul Burton's avatar Paul Burton Committed by Ralf Baechle
Browse files

MIPS: CPC: Use __raw_ memory access functions



The CPC 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>
Reported-by: default avatarKeng Koh <keng.koh@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/6657/


Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent cd217546
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -75,13 +75,13 @@ static inline bool mips_cpc_present(void)
#define BUILD_CPC_R_(name, off) \
#define BUILD_CPC_R_(name, off) \
static inline u32 read_cpc_##name(void)				\
static inline u32 read_cpc_##name(void)				\
{								\
{								\
	return readl(mips_cpc_base + (off));			\
	return __raw_readl(mips_cpc_base + (off));		\
}
}


#define BUILD_CPC__W(name, off) \
#define BUILD_CPC__W(name, off) \
static inline void write_cpc_##name(u32 value)			\
static inline void write_cpc_##name(u32 value)			\
{								\
{								\
	writel(value, mips_cpc_base + (off));			\
	__raw_writel(value, mips_cpc_base + (off));		\
}
}


#define BUILD_CPC_RW(name, off)					\
#define BUILD_CPC_RW(name, off)					\