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

Commit 2ba60250 authored by Paul Burton's avatar Paul Burton
Browse files

MIPS: CPC: provide functions to retrieve register addresses



This patch introduces addr_ functions in addition to the existing read_
& write_ functions. The new functions simply return the address of the
appropriate CPC register rather than performing a memory access. This
will be used in a subsequent patch.

Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
parent 76306f42
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -73,6 +73,11 @@ static inline bool mips_cpc_present(void)

/* Macros to ease the creation of register access functions */
#define BUILD_CPC_R_(name, off)					\
static inline u32 *addr_cpc_##name(void)			\
{								\
	return (u32 *)(mips_cpc_base + (off));			\
}								\
								\
static inline u32 read_cpc_##name(void)				\
{								\
	return __raw_readl(mips_cpc_base + (off));		\