powerpc, 8xx: move get_immr() into C
Avoid unnecessary assembly functions when they can easily be written
in C.
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
diff --git a/arch/powerpc/include/asm/ppc.h b/arch/powerpc/include/asm/ppc.h
index 27d3b83..e11f398 100644
--- a/arch/powerpc/include/asm/ppc.h
+++ b/arch/powerpc/include/asm/ppc.h
@@ -38,8 +38,15 @@
#include <asm/arch/immap_lsch2.h>
#endif
+#include <asm/processor.h>
+
#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);