aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/include
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@c-s.fr>2017-07-13 15:10:06 +0200
committerTom Rini <trini@konsulko.com>2017-07-22 22:22:51 -0400
commitba2c5a5c9d478c58277c4b0bb1187a6e82912410 (patch)
treea1ef570acd2f109cb9102cd8b2dc3a95a5787a68 /arch/powerpc/include
parent506cb8be7e83d29b316e1708bcf05359be16cfb7 (diff)
downloadu-boot-ba2c5a5c9d478c58277c4b0bb1187a6e82912410.zip
u-boot-ba2c5a5c9d478c58277c4b0bb1187a6e82912410.tar.gz
u-boot-ba2c5a5c9d478c58277c4b0bb1187a6e82912410.tar.bz2
powerpc: move get_pvr() and get_svr() 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.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/powerpc/include/asm/ppc.h b/arch/powerpc/include/asm/ppc.h
index 61838cb..aa5dd85 100644
--- a/arch/powerpc/include/asm/ppc.h
+++ b/arch/powerpc/include/asm/ppc.h
@@ -48,8 +48,15 @@ static inline uint get_immr(uint mask)
return mask ? (immr & mask) : immr;
}
#endif
-uint get_pvr(void);
-uint get_svr(void);
+static inline uint get_pvr(void)
+{
+ return mfspr(PVR);
+}
+
+static inline uint get_svr(void)
+{
+ return mfspr(SVR);
+}
#if defined(CONFIG_MPC85xx) || \
defined(CONFIG_MPC86xx) || \