Skip to contentSkip to conversation

Add support for the e300c2 core

PATCH In review Kim Phillips 2 participants 2 messages Oct 1, 2006 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Add support for the e300c2 core

Add support for the Freescale e300c2 core found in the MPC832x processor line.

As far as the kernel is concerned, the e300c2 core is identical to the e300c1 found in the mpc834x, except that it's had its floating point unit chopped off.

---
 arch/powerpc/kernel/cputable.c |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)
arch/powerpc/kernel/cputable.c +15 -3
index 190a57e..ce13830 100644
@@ -63,6 +63,7 @@ #define COMMON_USER_PA6T	(COMMON_USER_PP
 				 PPC_FEATURE_HAS_ALTIVEC_COMP)
 #define COMMON_USER_BOOKE	(PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
 				 PPC_FEATURE_BOOKE)
+#define COMMON_USER_E300	(PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU)
 
 /* We only set the spe features if the kernel was compiled with
  * spe support
@@ -763,12 +764,23 @@ #if CLASSIC_PPC
 		.cpu_setup		= __setup_cpu_603,
 		.platform		= "ppc603",
 	},
-	{	/* e300 (a 603e core, plus some) on 83xx */
+	{	/* e300c1 (a 603e core, plus some) on 83xx */
 		.pvr_mask		= 0x7fff0000,
 		.pvr_value		= 0x00830000,
-		.cpu_name		= "e300",
+		.cpu_name		= "e300c1",
 		.cpu_features		= CPU_FTRS_E300,
-		.cpu_user_features	= COMMON_USER,
+		.cpu_user_features	= COMMON_USER_E300 | PPC_FEATURE_HAS_FPU,
+		.icache_bsize		= 32,
+		.dcache_bsize		= 32,
+		.cpu_setup		= __setup_cpu_603,
+		.platform		= "ppc603",
+	},
+	{	/* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
+		.pvr_mask		= 0x7fff0000,
+		.pvr_value		= 0x00840000,
+		.cpu_name		= "e300c2",
+		.cpu_features		= CPU_FTRS_E300,
+		.cpu_user_features	= COMMON_USER_E300,
 		.icache_bsize		= 32,
 		.dcache_bsize		= 32,
 		.cpu_setup		= __setup_cpu_603,
Signature · 1 line
1.4.2.1
#1 lore raw
Quoted 14 lines · Kim Phillips

Add support for the Freescale e300c2 core found in the MPC832x processor line.

As far as the kernel is concerned, the e300c2 core is identical to the e300c1 found in the mpc834x, except that it's had its floating point unit chopped off.

---
 arch/powerpc/kernel/cputable.c |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)
arch/powerpc/kernel/cputable.c +0 -0
index 190a57e..ce13830 100644

arch/powerpc/kernel/cputable.c #define COMMON_USER_PA6T (COMMON_USER_PP · line 66

Quoted 4 lines
arch/powerpc/kernel/cputable.c +1 -0
@@ -63,6 +63,7 @@ #define COMMON_USER_PA6T	(COMMON_USER_PP
 				 PPC_FEATURE_HAS_ALTIVEC_COMP)
 #define COMMON_USER_BOOKE	(PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
 				 PPC_FEATURE_BOOKE)
+#define COMMON_USER_E300	(PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU)

Lets just drop COMMON_USER_E300 and explicitly set this like we do on 8xx.

Quoted 5 lines
arch/powerpc/kernel/cputable.c +0 -0
 /* We only set the spe features if the kernel was compiled with
  * spe support
@@ -763,12 +764,23 @@ #if CLASSIC_PPC
 		.cpu_setup		= __setup_cpu_603,
 		.platform		= "ppc603",

arch/powerpc/kernel/cputable.c #if CLASSIC_PPC · line 772

Quoted 10 lines
arch/powerpc/kernel/cputable.c +3 -3
 	},
-	{	/* e300 (a 603e core, plus some) on 83xx */
+	{	/* e300c1 (a 603e core, plus some) on 83xx */
 		.pvr_mask		= 0x7fff0000,
 		.pvr_value		= 0x00830000,
-		.cpu_name		= "e300",
+		.cpu_name		= "e300c1",
 		.cpu_features		= CPU_FTRS_E300,
-		.cpu_user_features	= COMMON_USER,
+		.cpu_user_features	= COMMON_USER_E300 | PPC_FEATURE_HAS_FPU,

This seems point less, why not just leave this as COMMON_USER for e300c1

arch/powerpc/kernel/cputable.c #if CLASSIC_PPC · line 783

Quoted 11 lines
arch/powerpc/kernel/cputable.c +11 -0
+		.icache_bsize		= 32,
+		.dcache_bsize		= 32,
+		.cpu_setup		= __setup_cpu_603,
+		.platform		= "ppc603",
+	},
+	{	/* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
+		.pvr_mask		= 0x7fff0000,
+		.pvr_value		= 0x00840000,
+		.cpu_name		= "e300c2",
+		.cpu_features		= CPU_FTRS_E300,
+		.cpu_user_features	= COMMON_USER_E300,

Why don't we just set .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU like we do on 8xx.

arch/powerpc/kernel/cputable.c #if CLASSIC_PPC · line 786

Quoted 3 lines
arch/powerpc/kernel/cputable.c +0 -0
 		.icache_bsize		= 32,
 		.dcache_bsize		= 32,
 		.cpu_setup		= __setup_cpu_603,

- kumar