From 7fd697fd54eabd3cfe28414d9c05f65c8cfd9585 Mon Sep 17 00:00:00 2001 From: Christophe Leroy Date: Thu, 13 Jul 2017 15:10:02 +0200 Subject: powerpc, 8xx: move get_immr() into C Avoid unnecessary assembly functions when they can easily be written in C. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/ppc.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'arch/powerpc/include/asm') diff --git a/arch/powerpc/include/asm/ppc.h b/arch/powerpc/include/asm/ppc.h index 27d3b83e070..e11f39801e5 100644 --- a/arch/powerpc/include/asm/ppc.h +++ b/arch/powerpc/include/asm/ppc.h @@ -38,8 +38,15 @@ #include #endif +#include + #if defined(CONFIG_8xx) -uint get_immr(uint); +static inline uint get_immr(uint mask) +{ + uint immr = mfspr(SPRN_IMMR); + + return mask ? (immr & mask) : immr; +} #endif uint get_pvr(void); uint get_svr(void); -- cgit v1.3.1