[PATCH] [POWERPC] Move generic MPC82xx functions out of ADS-specific
Arnd Bergmann
arnd at arndb.de
Fri Jul 13 09:59:40 EST 2007
On Thursday 12 July 2007, Laurent Pinchart wrote:
> > Ah, I missed that. I'd just get rid of "Vendor" altogether, and include
> > the vendor name in the machine name.
>
> Is there any standard/documentation regarding what show_cpuinfo should print ?
> Should it show CPU information only, or board information as well ? What
> about the memory size, clock settings, ... ? What are the meanings
> of "vendor" and "machine" ?
I guess the easiest would be to modify the common show_cpuinfo function
to fall back to just printing the model, if there is no specific function:
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -175,6 +175,12 @@ static int show_cpuinfo(struct seq_file *m, void *v)
seq_printf(m, "platform\t: %s\n", ppc_md.name);
if (ppc_md.show_cpuinfo != NULL)
ppc_md.show_cpuinfo(m);
+ else {
+ struct device_node *root = of_find_node_by_path("/");
+ const char *model = of_get_property(root, "model", NULL);
+ seq_printf(m, "machine\t\t: %s\n", model);
+ of_node_put(root);
+ }
return 0;
}
With that in place, we can probably get rid of half the platform
specific show_cpuinfo functions.
Arnd <><
More information about the Linuxppc-embedded
mailing list