[RFC] ppc32: Report chip version in common /proc/cpuinfo handling

6 messages, 3 authors, 2005-03-21 · open the first message on its own page

[RFC] ppc32: Report chip version in common /proc/cpuinfo handling

From: Kumar Gala <hidden>
Date: 2005-03-19 00:26:59

Tom,

You asked me to look at doing the following.  I just want to make sure 
this is what we want to do (and call it).  I'm a little concerned that 
'chip' is not necessary the right name in light of TSI10x and MV64x60 
being described by ppc_sys in the future.

- kumar

--

Moved reporting of chip revision from board specific to common handing of 
/proc/cpuinfo.  In light of numerous PPC system-on-chip devices, we report 
both the cpu version (reflects the core version) and the chip version 
(reflects the system-on-chip version).

Signed-off-by: Kumar Gala <redacted>

---
diff -Nru a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c
--- a/arch/ppc/kernel/setup.c	2005-03-18 18:17:16 -06:00
+++ b/arch/ppc/kernel/setup.c	2005-03-18 18:17:16 -06:00
@@ -40,6 +40,7 @@
 #include <asm/nvram.h>
 #include <asm/xmon.h>
 #include <asm/ocp.h>
+#include <asm/ppc_sys.h>
 
 #if defined CONFIG_KGDB
 #include <asm/kgdb.h>
@@ -245,6 +246,11 @@
 
 	seq_printf(m, "bogomips\t: %lu.%02lu\n",
 		   lpj / (500000/HZ), (lpj / (5000/HZ)) % 100);
+
+#if defined (CONFIG_85xx) || defined (CONFIG_83xx)
+	if (cur_ppc_sys_spec->ppc_sys_name)
+		seq_printf(m, "chip\t\t: %s\n", cur_ppc_sys_spec->ppc_sys_name);
+#endif
 
 #ifdef CONFIG_SMP
 	seq_printf(m, "\n");
diff -Nru a/arch/ppc/platforms/83xx/mpc834x_sys.c b/arch/ppc/platforms/83xx/mpc834x_sys.c
--- a/arch/ppc/platforms/83xx/mpc834x_sys.c	2005-03-18 18:17:16 -06:00
+++ b/arch/ppc/platforms/83xx/mpc834x_sys.c	2005-03-18 18:17:16 -06:00
@@ -143,7 +143,6 @@
 	pvid = mfspr(SPRN_PVR);
 	svid = mfspr(SPRN_SVR);
 
-	seq_printf(m, "chip\t\t: MPC%s\n", cur_ppc_sys_spec->ppc_sys_name);
 	seq_printf(m, "Vendor\t\t: Freescale Inc.\n");
 	seq_printf(m, "Machine\t\t: mpc%s sys\n", cur_ppc_sys_spec->ppc_sys_name);
 	seq_printf(m, "core clock\t: %d MHz\n"
diff -Nru a/arch/ppc/platforms/85xx/mpc85xx_ads_common.c b/arch/ppc/platforms/85xx/mpc85xx_ads_common.c
--- a/arch/ppc/platforms/85xx/mpc85xx_ads_common.c	2005-03-18 18:17:16 -06:00
+++ b/arch/ppc/platforms/85xx/mpc85xx_ads_common.c	2005-03-18 18:17:16 -06:00
@@ -129,7 +129,6 @@
 	pvid = mfspr(SPRN_PVR);
 	svid = mfspr(SPRN_SVR);
 
-	seq_printf(m, "chip\t\t: MPC%s\n", cur_ppc_sys_spec->ppc_sys_name);
 	seq_printf(m, "Vendor\t\t: Freescale Semiconductor\n");
 	seq_printf(m, "Machine\t\t: mpc%sads\n", cur_ppc_sys_spec->ppc_sys_name);
 	seq_printf(m, "clock\t\t: %dMHz\n", freq / 1000000);
diff -Nru a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c
--- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c	2005-03-18 18:17:16 -06:00
+++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c	2005-03-18 18:17:16 -06:00
@@ -146,7 +146,6 @@
 	pvid = mfspr(SPRN_PVR);
 	svid = mfspr(SPRN_SVR);
 
-	seq_printf(m, "chip\t\t: MPC%s\n", cur_ppc_sys_spec->ppc_sys_name);
 	seq_printf(m, "Vendor\t\t: Freescale Semiconductor\n");
 	seq_printf(m, "Machine\t\t: CDS - MPC%s (%x)\n", cur_ppc_sys_spec->ppc_sys_name, cadmus[CM_VER]);
 	seq_printf(m, "clock\t\t: %dMHz\n", freq / 1000000);
diff -Nru a/arch/ppc/platforms/85xx/sbc85xx.c b/arch/ppc/platforms/85xx/sbc85xx.c
--- a/arch/ppc/platforms/85xx/sbc85xx.c	2005-03-18 18:17:16 -06:00
+++ b/arch/ppc/platforms/85xx/sbc85xx.c	2005-03-18 18:17:16 -06:00
@@ -129,7 +129,6 @@
 	pvid = mfspr(SPRN_PVR);
 	svid = mfspr(SPRN_SVR);
 
-	seq_printf(m, "chip\t\t: MPC%s\n", cur_ppc_sys_spec->ppc_sys_name);
 	seq_printf(m, "Vendor\t\t: Wind River\n");
 	seq_printf(m, "Machine\t\t: SBC%s\n", cur_ppc_sys_spec->ppc_sys_name);
 	seq_printf(m, "clock\t\t: %dMHz\n", freq / 1000000);
diff -Nru a/arch/ppc/platforms/85xx/stx_gp3.c b/arch/ppc/platforms/85xx/stx_gp3.c
--- a/arch/ppc/platforms/85xx/stx_gp3.c	2005-03-18 18:17:16 -06:00
+++ b/arch/ppc/platforms/85xx/stx_gp3.c	2005-03-18 18:17:16 -06:00
@@ -268,7 +268,6 @@
 
 	memsize = total_memory;
 
-	seq_printf(m, "chip\t\t: MPC%s\n", cur_ppc_sys_spec->ppc_sys_name);
 	seq_printf(m, "Vendor\t\t: RPC Electronics STx \n");
 	seq_printf(m, "Machine\t\t: GP3 - MPC%s\n", cur_ppc_sys_spec->ppc_sys_name);
 	seq_printf(m, "bus freq\t: %u.%.6u MHz\n", freq / 1000000,

Re: [RFC] ppc32: Report chip version in common /proc/cpuinfo handling

From: Kumar Gala <hidden>
Date: 2005-03-21 16:33:25

Ok, in a possible solution we could call it 'chip(set)' this dealing=20
with either chips (85??, 82??, 52??, ....) or chipsets (MV64x60,=20
TSI10x, MPC10x, etc..)

- kumar

On Mar 18, 2005, at 6:26 PM, Kumar Gala wrote:
Tom,

You asked me to look at doing the following.=A0 I just want to make =
sure
this is what we want to do (and call it).=A0 I'm a little concerned =
that
'chip' is not necessary the right name in light of TSI10x and MV64x60
being described by ppc_sys in the future.

- kumar

--=20

Moved reporting of chip revision from board specific to common handing=20=
of
/proc/cpuinfo.=A0 In light of numerous PPC system-on-chip devices, we=20=
quoted hunk
report
both the cpu version (reflects the core version) and the chip version
(reflects the system-on-chip version).

Signed-off-by: Kumar Gala <redacted>

---
 diff -Nru a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c
--- a/arch/ppc/kernel/setup.c=A0=A0 2005-03-18 18:17:16 -06:00
 +++ b/arch/ppc/kernel/setup.c=A0=A0 2005-03-18 18:17:16 -06:00
 @@ -40,6 +40,7 @@
 =A0#include <asm/nvram.h>
=A0#include <asm/xmon.h>
=A0#include <asm/ocp.h>
 +#include <asm/ppc_sys.h>
=A0
 =A0#if defined CONFIG_KGDB
=A0#include <asm/kgdb.h>
 @@ -245,6 +246,11 @@
 =A0
 =A0=A0=A0=A0=A0=A0=A0 seq_printf(m, "bogomips\t: %lu.%02lu\n",
 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =A0=A0 lpj / (500000/HZ), =
(lpj / (5000/HZ)) % 100);
quoted hunk
 +
 +#if defined (CONFIG_85xx) || defined (CONFIG_83xx)
+=A0=A0=A0=A0=A0=A0 if (cur_ppc_sys_spec->ppc_sys_name)
+=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 seq_printf(m, "chip\t\t: =
%s\n",=20
quoted hunk
cur_ppc_sys_spec->ppc_sys_name);
+#endif
 =A0
 =A0#ifdef CONFIG_SMP
=A0=A0=A0=A0=A0=A0=A0 seq_printf(m, "\n");
 diff -Nru a/arch/ppc/platforms/83xx/mpc834x_sys.c=20
b/arch/ppc/platforms/83xx/mpc834x_sys.c
--- a/arch/ppc/platforms/83xx/mpc834x_sys.c=A0=A0=A0=A0 2005-03-18 =
18:17:16=20
-06:00
 +++ b/arch/ppc/platforms/83xx/mpc834x_sys.c=A0=A0=A0=A0 2005-03-18 =
18:17:16=20
quoted hunk
-06:00
 @@ -143,7 +143,6 @@
 =A0=A0=A0=A0=A0=A0=A0 pvid =3D mfspr(SPRN_PVR);
=A0=A0=A0=A0=A0=A0=A0 svid =3D mfspr(SPRN_SVR);
=A0
 -=A0=A0=A0=A0=A0=A0 seq_printf(m, "chip\t\t: MPC%s\n",=20
cur_ppc_sys_spec->ppc_sys_name);
=A0=A0=A0=A0=A0=A0=A0 seq_printf(m, "Vendor\t\t: Freescale Inc.\n");
 =A0=A0=A0=A0=A0=A0=A0 seq_printf(m, "Machine\t\t: mpc%s sys\n",=20
cur_ppc_sys_spec->ppc_sys_name);
=A0=A0=A0=A0=A0=A0=A0 seq_printf(m, "core clock\t: %d MHz\n"
 diff -Nru a/arch/ppc/platforms/85xx/mpc85xx_ads_common.c=20
b/arch/ppc/platforms/85xx/mpc85xx_ads_common.c
--- a/arch/ppc/platforms/85xx/mpc85xx_ads_common.c=A0=A0=A0=A0=A0 =
2005-03-18=20
18:17:16 -06:00
 +++ b/arch/ppc/platforms/85xx/mpc85xx_ads_common.c=A0=A0=A0=A0=A0 =
2005-03-18=20
18:17:16 -06:00
 @@ -129,7 +129,6 @@
 =A0=A0=A0=A0=A0=A0=A0 pvid =3D mfspr(SPRN_PVR);
=A0=A0=A0=A0=A0=A0=A0 svid =3D mfspr(SPRN_SVR);
=A0
 -=A0=A0=A0=A0=A0=A0 seq_printf(m, "chip\t\t: MPC%s\n",=20
cur_ppc_sys_spec->ppc_sys_name);
=A0=A0=A0=A0=A0=A0=A0 seq_printf(m, "Vendor\t\t: Freescale =
Semiconductor\n");
=A0=A0=A0=A0=A0=A0=A0 seq_printf(m, "Machine\t\t: mpc%sads\n",=20
cur_ppc_sys_spec->ppc_sys_name);
=A0=A0=A0=A0=A0=A0=A0 seq_printf(m, "clock\t\t: %dMHz\n", freq / =
1000000);
quoted hunk
 diff -Nru a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c=20
b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c
--- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c=A0=A0=A0=A0=A0 =
2005-03-18=20
18:17:16 -06:00
 +++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c=A0=A0=A0=A0=A0 =
2005-03-18=20
18:17:16 -06:00
 @@ -146,7 +146,6 @@
 =A0=A0=A0=A0=A0=A0=A0 pvid =3D mfspr(SPRN_PVR);
=A0=A0=A0=A0=A0=A0=A0 svid =3D mfspr(SPRN_SVR);
=A0
 -=A0=A0=A0=A0=A0=A0 seq_printf(m, "chip\t\t: MPC%s\n",=20
cur_ppc_sys_spec->ppc_sys_name);
=A0=A0=A0=A0=A0=A0=A0 seq_printf(m, "Vendor\t\t: Freescale =
Semiconductor\n");
=A0=A0=A0=A0=A0=A0=A0 seq_printf(m, "Machine\t\t: CDS - MPC%s (%x)\n",=20=
cur_ppc_sys_spec->ppc_sys_name, cadmus[CM_VER]);
=A0=A0=A0=A0=A0=A0=A0 seq_printf(m, "clock\t\t: %dMHz\n", freq / =
1000000);
quoted hunk
 diff -Nru a/arch/ppc/platforms/85xx/sbc85xx.c=20
b/arch/ppc/platforms/85xx/sbc85xx.c
--- a/arch/ppc/platforms/85xx/sbc85xx.c 2005-03-18 18:17:16 -06:00
 +++ b/arch/ppc/platforms/85xx/sbc85xx.c 2005-03-18 18:17:16 -06:00
 @@ -129,7 +129,6 @@
 =A0=A0=A0=A0=A0=A0=A0 pvid =3D mfspr(SPRN_PVR);
=A0=A0=A0=A0=A0=A0=A0 svid =3D mfspr(SPRN_SVR);
=A0
 -=A0=A0=A0=A0=A0=A0 seq_printf(m, "chip\t\t: MPC%s\n",=20
cur_ppc_sys_spec->ppc_sys_name);
=A0=A0=A0=A0=A0=A0=A0 seq_printf(m, "Vendor\t\t: Wind River\n");
=A0=A0=A0=A0=A0=A0=A0 seq_printf(m, "Machine\t\t: SBC%s\n",=20
cur_ppc_sys_spec->ppc_sys_name);
=A0=A0=A0=A0=A0=A0=A0 seq_printf(m, "clock\t\t: %dMHz\n", freq / =
1000000);
quoted hunk
 diff -Nru a/arch/ppc/platforms/85xx/stx_gp3.c=20
b/arch/ppc/platforms/85xx/stx_gp3.c
--- a/arch/ppc/platforms/85xx/stx_gp3.c 2005-03-18 18:17:16 -06:00
 +++ b/arch/ppc/platforms/85xx/stx_gp3.c 2005-03-18 18:17:16 -06:00
 @@ -268,7 +268,6 @@
 =A0
 =A0=A0=A0=A0=A0=A0=A0 memsize =3D total_memory;
 =A0
 -=A0=A0=A0=A0=A0=A0 seq_printf(m, "chip\t\t: MPC%s\n",=20
cur_ppc_sys_spec->ppc_sys_name);
=A0=A0=A0=A0=A0=A0=A0 seq_printf(m, "Vendor\t\t: RPC Electronics STx =
\n");
 =A0=A0=A0=A0=A0=A0=A0 seq_printf(m, "Machine\t\t: GP3 - MPC%s\n",=20
cur_ppc_sys_spec->ppc_sys_name);
=A0=A0=A0=A0=A0=A0=A0 seq_printf(m, "bus freq\t: %u.%.6u MHz\n", freq =
/ 1000000,
_______________________________________________
Linuxppc-embedded mailing list
 Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded

Re: [RFC] ppc32: Report chip version in common /proc/cpuinfo handling

From: Tom Rini <hidden>
Date: 2005-03-21 16:39:06

On Fri, Mar 18, 2005 at 06:26:52PM -0600, Kumar Gala wrote:
You asked me to look at doing the following.  I just want to make sure 
this is what we want to do (and call it).  I'm a little concerned that 
'chip' is not necessary the right name in light of TSI10x and MV64x60 
being described by ppc_sys in the future.
"chip" or "chip(set)" or anything else is fine with me (I'm horrible at
names).  But I don't like:
quoted hunk
+#if defined (CONFIG_85xx) || defined (CONFIG_83xx)
+	if (cur_ppc_sys_spec->ppc_sys_name)
+		seq_printf(m, "chip\t\t: %s\n", cur_ppc_sys_spec->ppc_sys_name);
+#endif
ifdef'ing this.  If the field is set, we should print it.

-- 
Tom Rini
http://gate.crashing.org/~trini/

Re: [RFC] ppc32: Report chip version in common /proc/cpuinfo handling

From: Kumar Gala <hidden>
Date: 2005-03-21 17:21:29

On Mar 21, 2005, at 10:39 AM, Tom Rini wrote:
On Fri, Mar 18, 2005 at 06:26:52PM -0600, Kumar Gala wrote:
quoted
You asked me to look at doing the following.=A0 I just want to make=20=
sure
quoted
this is what we want to do (and call it).=A0 I'm a little concerned=20=
that
quoted
'chip' is not necessary the right name in light of TSI10x and =
MV64x60
quoted
being described by ppc_sys in the future.
"chip" or "chip(set)" or anything else is fine with me (I'm horrible =
at
 names).=A0 But I don't like:
quoted
+#if defined (CONFIG_85xx) || defined (CONFIG_83xx)
+=A0=A0=A0=A0 if (cur_ppc_sys_spec->ppc_sys_name)
+=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 seq_printf(m, "chip\t\t: %s\n",=20=
cur_ppc_sys_spec->ppc_sys_name);
quoted
+#endif
ifdef'ing this.=A0 If the field is set, we should print it.
The only reason this is ifdef'd is that cur_ppc_sys_spec does not=20
always exist on all platforms built.

- kumar=

Re: [RFC] ppc32: Report chip version in common /proc/cpuinfo handling

From: Tom Rini <hidden>
Date: 2005-03-21 18:05:50

On Mon, Mar 21, 2005 at 11:21:28AM -0600, Kumar Gala wrote:
On Mar 21, 2005, at 10:39 AM, Tom Rini wrote:
quoted
On Fri, Mar 18, 2005 at 06:26:52PM -0600, Kumar Gala wrote:
quoted
You asked me to look at doing the following.? I just want to make 
sure
quoted
this is what we want to do (and call it).? I'm a little concerned 
that
quoted
'chip' is not necessary the right name in light of TSI10x and MV64x60
being described by ppc_sys in the future.
"chip" or "chip(set)" or anything else is fine with me (I'm horrible at
names).? But I don't like:
quoted
+#if defined (CONFIG_85xx) || defined (CONFIG_83xx)
+???? if (cur_ppc_sys_spec->ppc_sys_name)
+???? ??????? seq_printf(m, "chip\t\t: %s\n", 
cur_ppc_sys_spec->ppc_sys_name);
quoted
+#endif
ifdef'ing this.? If the field is set, we should print it.
The only reason this is ifdef'd is that cur_ppc_sys_spec does not 
always exist on all platforms built.
Oh boy, I sense an <asm-ppc/serial.h> in the making.  Please tell me
it's at least not possible that someone could stick an 85xx and an
MV64x60 together.  So we want the enum there to do sanity checking,
right?

-- 
Tom Rini
http://gate.crashing.org/~trini/

Re: [RFC] ppc32: Report chip version in common /proc/cpuinfo handling

From: Kumar Gala <hidden>
Date: 2005-03-21 18:32:08

On Mar 21, 2005, at 12:05 PM, Tom Rini wrote:
On Mon, Mar 21, 2005 at 11:21:28AM -0600, Kumar Gala wrote:
 >
quoted
On Mar 21, 2005, at 10:39 AM, Tom Rini wrote:
 >
quoted
quoted
On Fri, Mar 18, 2005 at 06:26:52PM -0600, Kumar Gala wrote:
 > >
 > >>
 > >> You asked me to look at doing the following.? I just want to =
make
quoted
quoted
sure
 > >> this is what we want to do (and call it).? I'm a little =
concerned
quoted
quoted
that
 > >> 'chip' is not necessary the right name in light of TSI10x and=20
MV64x60
 > >> being described by ppc_sys in the future.
 > >
 > >"chip" or "chip(set)" or anything else is fine with me (I'm=20
horrible at
 > > names).? But I don't like:
quoted
quoted
 > >> +#if defined (CONFIG_85xx) || defined (CONFIG_83xx)
quoted
quoted
quoted
+???? if (cur_ppc_sys_spec->ppc_sys_name)
+???? ??????? seq_printf(m, "chip\t\t: %s\n",
cur_ppc_sys_spec->ppc_sys_name);
quoted
+#endif
 > >
 > >ifdef'ing this.? If the field is set, we should print it.
 >
quoted
The only reason this is ifdef'd is that cur_ppc_sys_spec does not
always exist on all platforms built.
Oh boy, I sense an <asm-ppc/serial.h> in the making.=A0 Please tell me
 it's at least not possible that someone could stick an 85xx and an
 MV64x60 together.=A0 So we want the enum there to do sanity checking,
 right?
It is not possible that this could happen, in the sense that you are=20
using the MV64x60 as a chipset, not a PCI device or something bizarre.

- kumar=
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help