All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linuxppc-embedded@ozlabs.org
Cc: Laurent Pinchart <laurent.pinchart@cse-semaphore.com>,
	Vitaly Bordug <vbordug@ru.mvista.com>
Subject: Re: [PATCH] [POWERPC] Move generic MPC82xx functions out of ADS-specific
Date: Fri, 13 Jul 2007 01:59:40 +0200	[thread overview]
Message-ID: <200707130159.40394.arnd@arndb.de> (raw)
In-Reply-To: <200707121704.45373.laurent.pinchart@cse-semaphore.com>

On Thursday 12 July 2007, Laurent Pinchart wrote:
> > Ah, I missed that. =A0I'd just get rid of "Vendor" altogether, and incl=
ude
> > the vendor name in the machine name.
>=20
> Is there any standard/documentation regarding what show_cpuinfo should pr=
int ?=20
> Should it show CPU information only, or board information as well ? What=
=20
> about the memory size, clock settings, ... ? What are the meanings=20
> 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:

=2D-- 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 !=3D NULL)
 			ppc_md.show_cpuinfo(m);
+		else {
+			struct device_node *root =3D of_find_node_by_path("/");
+			const char *model =3D of_get_property(root, "model", NULL);
+			seq_printf(m, "machine\t\t: %s\n", model);
+			of_node_put(root);
+		}
=20
 		return 0;
 	}

With that in place, we can probably get rid of half the platform
specific show_cpuinfo functions.

	Arnd <><

  reply	other threads:[~2007-07-13  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-10 11:12 [PATCH] [POWERPC] Move generic MPC82xx functions out of ADS-specific Laurent Pinchart
2007-07-10 18:05 ` Scott Wood
2007-07-11  7:28   ` Laurent Pinchart
2007-07-11 15:25     ` Scott Wood
2007-07-12 14:57       ` Laurent Pinchart
2007-07-12 15:04       ` Laurent Pinchart
2007-07-12 23:59         ` Arnd Bergmann [this message]
2007-07-12 15:07       ` Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200707130159.40394.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=laurent.pinchart@cse-semaphore.com \
    --cc=linuxppc-embedded@ozlabs.org \
    --cc=vbordug@ru.mvista.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.