Commit b0a09f0c authored by Kumar Gala's avatar Kumar Gala Committed by Linus Torvalds

[PATCH] ppc32: Move from using #define SVR_ to cur_ppc_sys_spec name for 85xx platform

Removes explicit defines for SVR_85xx and use the information in the
ppc_sys_specs table in platform code.  Changed the ppc_sys_name strings to
be a bit more generic so we have a bit more flexilibity when we display
them.
Signed-off-by: default avatarKumar Gala <kumar.gala@freescale.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 572c61b3
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#include <asm/mpc85xx.h> #include <asm/mpc85xx.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/immap_85xx.h> #include <asm/immap_85xx.h>
#include <asm/ppc_sys.h>
#include <mm/mmu_decl.h> #include <mm/mmu_decl.h>
...@@ -128,19 +129,9 @@ mpc85xx_ads_show_cpuinfo(struct seq_file *m) ...@@ -128,19 +129,9 @@ mpc85xx_ads_show_cpuinfo(struct seq_file *m)
pvid = mfspr(PVR); pvid = mfspr(PVR);
svid = mfspr(SVR); svid = mfspr(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, "Vendor\t\t: Freescale Semiconductor\n");
seq_printf(m, "Machine\t\t: mpc%sads\n", cur_ppc_sys_spec->ppc_sys_name);
switch (svid & 0xffff0000) {
case SVR_8540:
seq_printf(m, "Machine\t\t: mpc8540ads\n");
break;
case SVR_8560:
seq_printf(m, "Machine\t\t: mpc8560ads\n");
break;
default:
seq_printf(m, "Machine\t\t: unknown\n");
break;
}
seq_printf(m, "clock\t\t: %dMHz\n", freq / 1000000); seq_printf(m, "clock\t\t: %dMHz\n", freq / 1000000);
seq_printf(m, "PVR\t\t: 0x%x\n", pvid); seq_printf(m, "PVR\t\t: 0x%x\n", pvid);
seq_printf(m, "SVR\t\t: 0x%x\n", svid); seq_printf(m, "SVR\t\t: 0x%x\n", svid);
......
...@@ -145,8 +145,9 @@ mpc85xx_cds_show_cpuinfo(struct seq_file *m) ...@@ -145,8 +145,9 @@ mpc85xx_cds_show_cpuinfo(struct seq_file *m)
pvid = mfspr(PVR); pvid = mfspr(PVR);
svid = mfspr(SVR); svid = mfspr(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, "Vendor\t\t: Freescale Semiconductor\n");
seq_printf(m, "Machine\t\t: CDS (%x)\n", cadmus[CM_VER]); 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); seq_printf(m, "clock\t\t: %dMHz\n", freq / 1000000);
seq_printf(m, "PVR\t\t: 0x%x\n", pvid); seq_printf(m, "PVR\t\t: 0x%x\n", pvid);
seq_printf(m, "SVR\t\t: 0x%x\n", svid); seq_printf(m, "SVR\t\t: 0x%x\n", svid);
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
struct ppc_sys_spec *cur_ppc_sys_spec; struct ppc_sys_spec *cur_ppc_sys_spec;
struct ppc_sys_spec ppc_sys_specs[] = { struct ppc_sys_spec ppc_sys_specs[] = {
{ {
.ppc_sys_name = "MPC8540", .ppc_sys_name = "8540",
.mask = 0xFFFF0000, .mask = 0xFFFF0000,
.value = 0x80300000, .value = 0x80300000,
.num_devices = 10, .num_devices = 10,
...@@ -33,7 +33,7 @@ struct ppc_sys_spec ppc_sys_specs[] = { ...@@ -33,7 +33,7 @@ struct ppc_sys_spec ppc_sys_specs[] = {
}, },
}, },
{ {
.ppc_sys_name = "MPC8560", .ppc_sys_name = "8560",
.mask = 0xFFFF0000, .mask = 0xFFFF0000,
.value = 0x80700000, .value = 0x80700000,
.num_devices = 19, .num_devices = 19,
...@@ -49,7 +49,7 @@ struct ppc_sys_spec ppc_sys_specs[] = { ...@@ -49,7 +49,7 @@ struct ppc_sys_spec ppc_sys_specs[] = {
}, },
}, },
{ {
.ppc_sys_name = "MPC8541", .ppc_sys_name = "8541",
.mask = 0xFFFF0000, .mask = 0xFFFF0000,
.value = 0x80720000, .value = 0x80720000,
.num_devices = 13, .num_devices = 13,
...@@ -63,7 +63,7 @@ struct ppc_sys_spec ppc_sys_specs[] = { ...@@ -63,7 +63,7 @@ struct ppc_sys_spec ppc_sys_specs[] = {
}, },
}, },
{ {
.ppc_sys_name = "MPC8541E", .ppc_sys_name = "8541E",
.mask = 0xFFFF0000, .mask = 0xFFFF0000,
.value = 0x807A0000, .value = 0x807A0000,
.num_devices = 14, .num_devices = 14,
...@@ -77,7 +77,7 @@ struct ppc_sys_spec ppc_sys_specs[] = { ...@@ -77,7 +77,7 @@ struct ppc_sys_spec ppc_sys_specs[] = {
}, },
}, },
{ {
.ppc_sys_name = "MPC8555", .ppc_sys_name = "8555",
.mask = 0xFFFF0000, .mask = 0xFFFF0000,
.value = 0x80710000, .value = 0x80710000,
.num_devices = 20, .num_devices = 20,
...@@ -94,7 +94,7 @@ struct ppc_sys_spec ppc_sys_specs[] = { ...@@ -94,7 +94,7 @@ struct ppc_sys_spec ppc_sys_specs[] = {
}, },
}, },
{ {
.ppc_sys_name = "MPC8555E", .ppc_sys_name = "8555E",
.mask = 0xFFFF0000, .mask = 0xFFFF0000,
.value = 0x80790000, .value = 0x80790000,
.num_devices = 21, .num_devices = 21,
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include <asm/mpc85xx.h> #include <asm/mpc85xx.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/immap_85xx.h> #include <asm/immap_85xx.h>
#include <asm/ppc_sys.h>
#include <mm/mmu_decl.h> #include <mm/mmu_decl.h>
...@@ -128,19 +129,9 @@ sbc8560_show_cpuinfo(struct seq_file *m) ...@@ -128,19 +129,9 @@ sbc8560_show_cpuinfo(struct seq_file *m)
pvid = mfspr(PVR); pvid = mfspr(PVR);
svid = mfspr(SVR); svid = mfspr(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, "Vendor\t\t: Wind River\n");
seq_printf(m, "Machine\t\t: SBC%s\n", cur_ppc_sys_spec->ppc_sys_name);
switch (svid & 0xffff0000) {
case SVR_8540:
seq_printf(m, "Machine\t\t: hhmmm, this board isn't made yet!\n");
break;
case SVR_8560:
seq_printf(m, "Machine\t\t: SBC8560\n");
break;
default:
seq_printf(m, "Machine\t\t: unknown\n");
break;
}
seq_printf(m, "clock\t\t: %dMHz\n", freq / 1000000); seq_printf(m, "clock\t\t: %dMHz\n", freq / 1000000);
seq_printf(m, "PVR\t\t: 0x%x\n", pvid); seq_printf(m, "PVR\t\t: 0x%x\n", pvid);
seq_printf(m, "SVR\t\t: 0x%x\n", svid); seq_printf(m, "SVR\t\t: 0x%x\n", svid);
......
...@@ -34,8 +34,10 @@ ...@@ -34,8 +34,10 @@
#include <linux/root_dev.h> #include <linux/root_dev.h>
#include <linux/seq_file.h> #include <linux/seq_file.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/initrd.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/fsl_devices.h> #include <linux/fsl_devices.h>
#include <linux/interrupt.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
...@@ -266,19 +268,9 @@ gp3_show_cpuinfo(struct seq_file *m) ...@@ -266,19 +268,9 @@ gp3_show_cpuinfo(struct seq_file *m)
memsize = total_memory; 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, "Vendor\t\t: RPC Electronics STx \n");
seq_printf(m, "Machine\t\t: GP3 - MPC%s\n", cur_ppc_sys_spec->ppc_sys_name);
switch (svid & 0xffff0000) {
case SVR_8540:
seq_printf(m, "Machine\t\t: GP3 - MPC8540\n");
break;
case SVR_8560:
seq_printf(m, "Machine\t\t: GP3 - MPC8560\n");
break;
default:
seq_printf(m, "Machine\t\t: unknown\n");
break;
}
seq_printf(m, "bus freq\t: %u.%.6u MHz\n", freq / 1000000, seq_printf(m, "bus freq\t: %u.%.6u MHz\n", freq / 1000000,
freq % 1000000); freq % 1000000);
seq_printf(m, "PVR\t\t: 0x%x\n", pvid); seq_printf(m, "PVR\t\t: 0x%x\n", pvid);
......
...@@ -488,12 +488,6 @@ ...@@ -488,12 +488,6 @@
#define PVR_8245 0x80811014 #define PVR_8245 0x80811014
#define PVR_8260 PVR_8240 #define PVR_8260 PVR_8240
/* System Version Numbers */
#define SVR_8540 0x80300000
#define SVR_8541E 0x807A0000
#define SVR_8555E 0x80790000
#define SVR_8560 0x80700000
#if 0 #if 0
/* Segment Registers */ /* Segment Registers */
#define SR0 0 #define SR0 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment