]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - post/lib_ppc/cr.c
rename CFG_ macros to CONFIG_SYS
[karo-tx-uboot.git] / post / lib_ppc / cr.c
index da6ef3745d0cb0c74282071b1fee1be5fec77cdc..fbee6d5c406ff4b856414449d8ad524bcc74befe 100644 (file)
  * expected one.
  */
 
-#ifdef CONFIG_POST
-
 #include <post.h>
 #include "cpu_asm.h"
 
-#if CONFIG_POST & CFG_POST_CPU
+#if CONFIG_POST & CONFIG_SYS_POST_CPU
 
 extern void cpu_post_exec_11 (ulong *code, ulong *res, ulong op1);
 extern void cpu_post_exec_21x (ulong *code, ulong *op1, ulong *op2, ulong op3);
@@ -250,6 +248,7 @@ int cpu_post_test_cr (void)
     int ret = 0;
     unsigned int i;
     unsigned long cr_sav;
+    int flag = disable_interrupts();
 
     asm ( "mfcr %0" : "=r" (cr_sav) : );
 
@@ -349,8 +348,10 @@ int cpu_post_test_cr (void)
 
     asm ( "mtcr %0" : : "r" (cr_sav));
 
+    if (flag)
+       enable_interrupts();
+
     return ret;
 }
 
 #endif
-#endif