Commit 0276c136 authored by Marian Balakowicz's avatar Marian Balakowicz Committed by Paul Mackerras

[POWERPC] Add 'model: ...' line to common show_cpuinfo()

Print out 'model' property of '/' node as a machine name
in generic show_cpuinfo() routine.
Signed-off-by: default avatarMarian Balakowicz <m8@semihalf.com>
Acked-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
Acked-by: default avatarOlof Johansson <olof@lixom.net>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent bed04a44
...@@ -167,6 +167,8 @@ static int show_cpuinfo(struct seq_file *m, void *v) ...@@ -167,6 +167,8 @@ static int show_cpuinfo(struct seq_file *m, void *v)
unsigned short min; unsigned short min;
if (cpu_id == NR_CPUS) { if (cpu_id == NR_CPUS) {
struct device_node *root;
const char *model = NULL;
#if defined(CONFIG_SMP) && defined(CONFIG_PPC32) #if defined(CONFIG_SMP) && defined(CONFIG_PPC32)
unsigned long bogosum = 0; unsigned long bogosum = 0;
int i; int i;
...@@ -178,6 +180,13 @@ static int show_cpuinfo(struct seq_file *m, void *v) ...@@ -178,6 +180,13 @@ static int show_cpuinfo(struct seq_file *m, void *v)
seq_printf(m, "timebase\t: %lu\n", ppc_tb_freq); seq_printf(m, "timebase\t: %lu\n", ppc_tb_freq);
if (ppc_md.name) if (ppc_md.name)
seq_printf(m, "platform\t: %s\n", ppc_md.name); seq_printf(m, "platform\t: %s\n", ppc_md.name);
root = of_find_node_by_path("/");
if (root)
model = of_get_property(root, "model", NULL);
if (model)
seq_printf(m, "model\t\t: %s\n", model);
of_node_put(root);
if (ppc_md.show_cpuinfo != NULL) if (ppc_md.show_cpuinfo != NULL)
ppc_md.show_cpuinfo(m); ppc_md.show_cpuinfo(m);
......
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