summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/ppc.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/include/asm/ppc.h')
-rw-r--r--arch/powerpc/include/asm/ppc.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/ppc.h b/arch/powerpc/include/asm/ppc.h
index 27d3b83e07..e11f39801e 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);