Add additional fdt fixup helper functions
[oweals/u-boot.git] / include / ppc440.h
index 61c937d9f9d3742dbe84f8cdc383d0da0266077b..38809f34b4b351dcaf84a9b7f4a596aaecdd349d 100644 (file)
 #define sdr_sdstp3     0x4003
 #endif /* CONFIG_440GX */
 
-#ifdef CONFIG_440
 /*----------------------------------------------------------------------------+
 | Core Configuration/MMU configuration for 440 (CCR1 for 440x5 only).
 +----------------------------------------------------------------------------*/
 #define MMUCR_IULXE            0x00400000
 #define MMUCR_STS              0x00100000
 #define MMUCR_STID_MASK                0x000000FF
-#endif /* CONFIG_440 */
 
 #ifdef CONFIG_440SPE
 #undef sdr_sdstp2
@@ -3356,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