1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-11-01 10:56:02 +01:00

powerpc: move set_msr() and get_msr() into .h

set_msr() and get_msr() are defined and used twice.
This patch moves them into ppc.h

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
This commit is contained in:
Christophe Leroy
2017-07-13 15:09:52 +02:00
committed by Tom Rini
parent f0eda3cb89
commit f1cd73674f
3 changed files with 14 additions and 28 deletions

View File

@@ -96,6 +96,20 @@ static inline ulong get_ddr_freq(ulong dummy)
ulong get_ddr_freq(ulong);
#endif
static inline unsigned long get_msr(void)
{
unsigned long msr;
asm volatile ("mfmsr %0" : "=r" (msr) : );
return msr;
}
static inline void set_msr(unsigned long msr)
{
asm volatile ("mtmsr %0" : : "r" (msr));
}
#endif /* !__ASSEMBLY__ */
#ifdef CONFIG_PPC