aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/include
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@c-s.fr>2017-07-13 15:10:02 +0200
committerTom Rini <trini@konsulko.com>2017-07-22 22:22:50 -0400
commit7fd697fd54eabd3cfe28414d9c05f65c8cfd9585 (patch)
treeb646f2930b9555bca9e8733ed902773d2d1c9fff /arch/powerpc/include
parent1e7cefef585c972ed40e016ba8739f5c5091254b (diff)
downloadu-boot-7fd697fd54eabd3cfe28414d9c05f65c8cfd9585.zip
u-boot-7fd697fd54eabd3cfe28414d9c05f65c8cfd9585.tar.gz
u-boot-7fd697fd54eabd3cfe28414d9c05f65c8cfd9585.tar.bz2
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>
Diffstat (limited to 'arch/powerpc/include')
-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 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);