]> git.sur5r.net Git - u-boot/blobdiff - include/ppc4xx.h
mgcoge, mgsuvd: add board specific I2C deblocking mechanism.
[u-boot] / include / ppc4xx.h
index 59a3b06b71cdc300f171c48802ac0cd66af2b690..e216663a86de7a4a1864a0af10ad6bfc07f61e82 100644 (file)
@@ -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__ */