Skip to contentSkip to conversation

m68k: add ColdFire FPU support for the V4e ColdFire CPUs

PATCH New [email protected] 1 participant 1 message Dec 29, 2011 m68k architecture

lore
Share & tools
lore
#0 lore raw

PATCH v5 32/36 m68k: add ColdFire FPU support for the V4e ColdFire CPUs

From: Greg Ungerer <[email protected]>

The V4e ColdFire CPU family also has an integrated FPU (as well as the MMU). So add code to support this hardware along side the existing m68k FPU code.

The ColdFire FPU is of course different to all previous 68k FP units. It is close in operation to the 68060, but not completely compatible. The biggest issue to deal with is that the ColdFire FPU multi-move instructions are different. It does not support multi-moving the FP control registers, and the multi-move of the FP data registers uses a different instruction mnemonic.

---
 arch/m68k/include/asm/fpu.h   |    2 +
 arch/m68k/kernel/process_mm.c |   59 ++++++++++---
 arch/m68k/kernel/setup_mm.c   |    2 +-
 arch/m68k/kernel/signal_mm.c  |  187 ++++++++++++++++++++++++++++++-----------
 4 files changed, 184 insertions(+), 66 deletions(-)
arch/m68k/include/asm/fpu.h +2 -0
index ffb6b8c..526db9d 100644
@@ -12,6 +12,8 @@
 #define FPSTATESIZE (96)
 #elif defined(CONFIG_M68KFPU_EMU)
 #define FPSTATESIZE (28)
+#elif defined(CONFIG_COLDFIRE) && defined(CONFIG_MMU)
+#define FPSTATESIZE (16)
 #elif defined(CONFIG_M68060)
 #define FPSTATESIZE (12)
 #else
arch/m68k/kernel/process_mm.c +45 -14

77 lines not on this page · raw message

arch/m68k/kernel/setup_mm.c +1 -1
index b3938ad..d872ce4 100644
@@ -236,7 +236,7 @@ void __init setup_arch(char **cmdline_p)
 	 *  with them, we should add a test to check_bugs() below] */
 #ifndef CONFIG_M68KFPU_EMU_ONLY
 	/* clear the fpu if we have one */
-	if (m68k_fputype & (FPU_68881|FPU_68882|FPU_68040|FPU_68060)) {
+	if (m68k_fputype & (FPU_68881|FPU_68882|FPU_68040|FPU_68060|FPU_COLDFIRE)) {
 		volatile int zero = 0;
 		asm volatile ("frestore %0" : : "m" (zero));
 	}
arch/m68k/kernel/signal_mm.c +136 -51

273 lines not on this page · raw message

Signature · 1 line
1.7.0.4