linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: linuxppc-embedded@lists.linuxppc.org
Subject: Board names for 4xx
Date: Fri, 14 Sep 2001 14:44:03 +1000	[thread overview]
Message-ID: <20010914144403.G3851@zax> (raw)


The patch below allows publishing the type of board the kernel is
running on in /proc/cpuinfo (under "machine") for 4xx machines.  It
displays Walnut boards as "IBM Walnut" and (currently) all others
simply as "4xx".  Adding other boards is trivial - just a #define in
the relevant header file.  It also eliminates a warning in
ppc4xx_setup.c

diff -urN ../linuxppc_2_4_devel/arch/ppc/kernel/ppc4xx_setup.c linux-bungo/arch/ppc/kernel/ppc4xx_setup.c
--- ../linuxppc_2_4_devel/arch/ppc/kernel/ppc4xx_setup.c	Mon Sep 10 11:57:26 2001
+++ linux-bungo/arch/ppc/kernel/ppc4xx_setup.c	Wed Sep 12 16:33:15 2001
@@ -86,7 +86,7 @@
 #endif

 #define BOOT_WDT_DEFAULT_PERIOD		120	/* 2 minutes */
-extern board_setup_arch(void);
+extern void board_setup_arch(void);

 void __init
 ppc4xx_setup_arch(void)
@@ -165,6 +165,8 @@
 	int len = 0;
 	bd_t *bip = (bd_t *)__res;

+	len += sprintf(len + buffer,
+		       "machine\t: %s\n", PPC4xx_MACHINE_NAME);
 #ifdef CONFIG_STB03xxx
 	len += sprintf(len + buffer,
 			"plb bus clock\t: %dMHz\n",
diff -urN ../linuxppc_2_4_devel/include/asm-ppc/walnut.h linux-bungo/include/asm-ppc/walnut.h
--- ../linuxppc_2_4_devel/include/asm-ppc/walnut.h	Thu Aug 16 04:45:34 2001
+++ linux-bungo/include/asm-ppc/walnut.h	Wed Sep 12 16:29:23 2001
@@ -78,6 +78,7 @@
 /* Generic 4xx type
 */
 #define _MACH_4xx (_MACH_walnut)
+#define PPC4xx_MACHINE_NAME	"IBM Walnut"

 #endif /* __WALNUT_H__ */
 #endif /* __KERNEL__ */

--
David Gibson			| For every complex problem there is a
david@gibson.dropbear.id.au	| solution which is simple, neat and
				| wrong.  -- H.L. Mencken
http://www.ozlabs.org/people/dgibson


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

             reply	other threads:[~2001-09-14  4:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-14  4:44 David Gibson [this message]
2001-09-14  6:05 ` Board names for 4xx David Gibson
     [not found] ` <20010914072847.R21906@cpe-24-221-152-185.az.sprintbbd.net>
2001-09-17  2:28   ` David Gibson
2001-09-17  4:16     ` Tom Rini
2001-09-17 15:56       ` Dan Malek
2001-09-17 16:11         ` Kenneth Johansson
2001-09-17 18:33           ` Tom Rini
2001-09-18  0:35             ` David Gibson
2001-09-18  2:08               ` Tom Rini
2001-09-18  0:38         ` David Gibson

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=20010914144403.G3851@zax \
    --to=david@gibson.dropbear.id.au \
    --cc=linuxppc-embedded@lists.linuxppc.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).