]> git.sur5r.net Git - u-boot/blobdiff - post/cpu/ppc4xx/fpu.c
ppc4xx: Move ppc4xx headers to powerpc include directory
[u-boot] / post / cpu / ppc4xx / fpu.c
index c2eb4a9bf0b5e03c4a0dc7bba7284b3ebc2ad884..9f496906d223fa072c8c020838dc7a447f668da6 100644 (file)
 
 #include <config.h>
 
-#ifdef CONFIG_POST
 #if defined(CONFIG_440EP) || \
     defined(CONFIG_440EPX)
 
-#include <ppc4xx.h>
 #include <asm/processor.h>
+#include <asm/ppc4xx.h>
 
 
 int fpu_status(void)
 {
-       if (mfspr(ccr0) & CCR0_DAPUIB)
+       if (mfspr(SPRN_CCR0) & CCR0_DAPUIB)
                return 0; /* Disabled */
-       else 
+       else
                return 1; /* Enabled */
 }
 
 
 void fpu_disable(void)
 {
-       mtspr(ccr0, mfspr(ccr0) | CCR0_DAPUIB);
+       mtspr(SPRN_CCR0, mfspr(SPRN_CCR0) | CCR0_DAPUIB);
        mtmsr(mfmsr() & ~MSR_FP);
 }
 
 
 void fpu_enable(void)
 {
-       mtspr(ccr0, mfspr(ccr0) & ~CCR0_DAPUIB);
+       mtspr(SPRN_CCR0, mfspr(SPRN_CCR0) & ~CCR0_DAPUIB);
        mtmsr(mfmsr() | MSR_FP);
 }
 
 #endif
-#endif /* CONFIG_POST */