X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fppc440.h;h=38809f34b4b351dcaf84a9b7f4a596aaecdd349d;hb=4f2e92c11f6e2392fc8187829211a5ca7f0c1e12;hp=93c10f1209960809941f06a3c78478ad8abeddfc;hpb=46919751eac7d5c210e6e71ad4bf2bae4805902e;p=u-boot diff --git a/include/ppc440.h b/include/ppc440.h index 93c10f1209..38809f34b4 100644 --- a/include/ppc440.h +++ b/include/ppc440.h @@ -3354,6 +3354,19 @@ typedef struct { unsigned long pciClkSync; /* PCI clock is synchronous */ } PPC440_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 /* _ASMLANGUAGE */ #define RESET_VECTOR 0xfffffffc