Skip to contentSkip to conversation

powerpc/85xx: Cleanup how SVR_MAJ() is defined on MPC8536

PATCH New Kumar Gala 1 participant 2 messages Aug 24, 2011 – Sep 2, 2011 PowerPC

lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

PATCH 1/1 powerpc/85xx: Cleanup how SVR_MAJ() is defined on MPC8536

The MPC8536 seems to use only 3 bits for the major revision field in the SVR rather than the 4 bits used by all other processors. The most significant bit is used as a mfg code on MPC8536.

---
 arch/powerpc/cpu/mpc85xx/cpu.c       |    3 ---
 arch/powerpc/include/asm/processor.h |    4 ++++
 2 files changed, 4 insertions(+), 3 deletions(-)
arch/powerpc/cpu/mpc85xx/cpu.c +0 -3
index 52a34f7..2417a6a 100644
@@ -69,9 +69,6 @@ int checkcpu (void)
 
 	svr = get_svr();
 	major = SVR_MAJ(svr);
-#ifdef CONFIG_MPC8536
-	major &= 0x7; /* the msb of this nibble is a mfg code */
-#endif
 	minor = SVR_MIN(svr);
 
 	if (cpu_numcores() > 1) {
arch/powerpc/include/asm/processor.h +4 -0
index f5bf4dd..cf06dfa 100644
@@ -987,7 +987,11 @@
 #define SVR_FAM(svr)	(((svr) >> 20) & 0xFFF)	/* Family field */
 #define SVR_MEM(svr)	(((svr) >> 16) & 0xF)	/* Member field */
 
+#ifdef CONFIG_MPC8536
+#define SVR_MAJ(svr)	(((svr) >>  4) & 0x7)	/* Major revision field*/
+#else
 #define SVR_MAJ(svr)	(((svr) >>  4) & 0xF)	/* Major revision field*/
+#endif
 #define SVR_MIN(svr)	(((svr) >>  0) & 0xF)	/* Minor revision field*/
 
 /* Some parts define SVR[0:23] as the SOC version */
Signature · 1 line
1.7.3.4
author Applied
#1 lore raw

PATCH 1/1 powerpc/85xx: Cleanup how SVR_MAJ() is defined on MPC8536

Quoted 9 lines · Kumar Gala

The MPC8536 seems to use only 3 bits for the major revision field in the SVR rather than the 4 bits used by all other processors. The most significant bit is used as a mfg code on MPC8536.

---

arch/powerpc/cpu/mpc85xx/cpu.c       |    3 ---
arch/powerpc/include/asm/processor.h |    4 ++++
2 files changed, 4 insertions(+), 3 deletions(-)

applied to next

- k