X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=inline;f=include%2Fppc4xx.h;h=e216663a86de7a4a1864a0af10ad6bfc07f61e82;hb=965de106ba8900372c8b16dc60d5acab7f925e38;hp=59a3b06b71cdc300f171c48802ac0cd66af2b690;hpb=afe3848b79a7ff351e9fbf3a7c162d2de002279b;p=u-boot diff --git a/include/ppc4xx.h b/include/ppc4xx.h index 59a3b06b71..e216663a86 100644 --- a/include/ppc4xx.h +++ b/include/ppc4xx.h @@ -203,6 +203,19 @@ typedef struct unsigned long pllPlbDiv; } PPC4xx_SYS_INFO; +static inline u32 get_mcsr(void) +{ + u32 val; + + asm volatile("mfspr %0, 0x23c" : "=r" (val) :); + return val; +} + +static inline void set_mcsr(u32 val) +{ + asm volatile("mtspr 0x23c, %0" : "=r" (val) :); +} + #endif /* __ASSEMBLY__ */ #endif /* __PPC4XX_H__ */