mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-21 02:27:02 +07:00
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: Paul Burton <paul.burton@imgtec.com>
This commit is contained in:
parent
76306f4272
commit
2ba60250b0
@ -72,7 +72,12 @@ static inline bool mips_cpc_present(void)
|
||||
#define MIPS_CPC_COCB_OFS 0x4000
|
||||
|
||||
/* Macros to ease the creation of register access functions */
|
||||
#define BUILD_CPC_R_(name, off) \
|
||||
#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)); \
|
||||
|
Loading…
Reference in New Issue
Block a user