]> git.ipfire.org Git - people/ms/u-boot.git/blame - post/cpu/ppc4xx/fpu.c
drivers, block: remove sil680 driver
[people/ms/u-boot.git] / post / cpu / ppc4xx / fpu.c
CommitLineData
a11e0696 1/*
b4489621
SP
2 * (C) Copyright 2007
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 *
5 * Author: Sergei Poselenov <sposelenov@emcraft.com>
a11e0696 6 *
1a459660 7 * SPDX-License-Identifier: GPL-2.0+
a11e0696
IL
8 */
9
10#include <config.h>
11
a11e0696
IL
12#if defined(CONFIG_440EP) || \
13 defined(CONFIG_440EPX)
14
a11e0696 15#include <asm/processor.h>
b36df561 16#include <asm/ppc4xx.h>
a11e0696
IL
17
18
19int fpu_status(void)
20{
58ea142f 21 if (mfspr(SPRN_CCR0) & CCR0_DAPUIB)
a11e0696 22 return 0; /* Disabled */
4ef218f6 23 else
a11e0696
IL
24 return 1; /* Enabled */
25}
26
27
28void fpu_disable(void)
29{
58ea142f 30 mtspr(SPRN_CCR0, mfspr(SPRN_CCR0) | CCR0_DAPUIB);
a11e0696
IL
31 mtmsr(mfmsr() & ~MSR_FP);
32}
33
34
35void fpu_enable(void)
36{
58ea142f 37 mtspr(SPRN_CCR0, mfspr(SPRN_CCR0) & ~CCR0_DAPUIB);
a11e0696
IL
38 mtmsr(mfmsr() | MSR_FP);
39}
b4489621 40
a11e0696 41#endif