summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/setup-common.c
diff options
context:
space:
mode:
authorMarian Balakowicz <m8@semihalf.com>2007-11-09 18:11:43 +0100
committerPaul Mackerras <paulus@samba.org>2008-03-25 22:44:04 +0100
commit0276c1368f111b1fd75e6fe0bf4cd78a6903798f (patch)
tree3bf932a577f570d5a5d567fc7849bea2b6d3914b /arch/powerpc/kernel/setup-common.c
parentMerge branch 'linux-2.6' (diff)
downloadlinux-0276c1368f111b1fd75e6fe0bf4cd78a6903798f.tar.xz
linux-0276c1368f111b1fd75e6fe0bf4cd78a6903798f.zip
[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: Marian Balakowicz <m8@semihalf.com> Acked-by: David Gibson <david@gibson.dropbear.id.au> Acked-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/setup-common.c')
-rw-r--r--arch/powerpc/kernel/setup-common.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 12cc41c16b0d..db540eab09f4 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -167,6 +167,8 @@ static int show_cpuinfo(struct seq_file *m, void *v)
unsigned short min;
if (cpu_id == NR_CPUS) {
+ struct device_node *root;
+ const char *model = NULL;
#if defined(CONFIG_SMP) && defined(CONFIG_PPC32)
unsigned long bogosum = 0;
int i;
@@ -178,6 +180,13 @@ static int show_cpuinfo(struct seq_file *m, void *v)
seq_printf(m, "timebase\t: %lu\n", ppc_tb_freq);
if (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)
ppc_md.show_cpuinfo(m);