7 * SPDX-License-Identifier: GPL-2.0+
12 #if defined(CONFIG_440EP) || \
13 defined(CONFIG_440EPX)
15 #include <asm/processor.h>
16 #include <asm/ppc4xx.h>
21 if (mfspr(SPRN_CCR0) & CCR0_DAPUIB)
22 return 0; /* Disabled */
24 return 1; /* Enabled */
28 void fpu_disable(void)
30 mtspr(SPRN_CCR0, mfspr(SPRN_CCR0) | CCR0_DAPUIB);
31 mtmsr(mfmsr() & ~MSR_FP);
37 mtspr(SPRN_CCR0, mfspr(SPRN_CCR0) & ~CCR0_DAPUIB);
38 mtmsr(mfmsr() | MSR_FP);