Merge with git://www.denx.de/git/u-boot.git
[platform/kernel/u-boot.git] / include / ppc440.h
index 93c10f1..38809f3 100644 (file)
@@ -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