From: Kim Phillips <kim.phillips@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH 3/3] mpc83xx: cleanup System Part and Revision ID Register (SPRIDR) code
Date: Fri, 28 Mar 2008 12:29:33 -0500 [thread overview]
Message-ID: <20080328122933.d0489663.kim.phillips@freescale.com> (raw)
In-Reply-To: <1206718463.7589.345.camel@gentoo-jocke.transmode.se>
On Fri, 28 Mar 2008 16:34:23 +0100
Joakim Tjernlund <joakim.tjernlund@transmode.se> wrote:
>
> Global data, could become a problem if/when full relocation is impl. Not
> a big deal, just figured I should mention it.
would you rather something like this then? :
diff --git a/cpu/mpc83xx/cpu.c b/cpu/mpc83xx/cpu.c
index c878268..36de78d 100644
--- a/cpu/mpc83xx/cpu.c
+++ b/cpu/mpc83xx/cpu.c
@@ -35,32 +35,6 @@
DECLARE_GLOBAL_DATA_PTR;
-struct cpu_type {
- char name[15];
- u32 partid;
-};
-
-#define CPU_TYPE_ENTRY(x) {#x, SPR_##x}
-
-struct cpu_type cpu_type_list [] = {
- CPU_TYPE_ENTRY(8311),
- CPU_TYPE_ENTRY(8313),
- CPU_TYPE_ENTRY(8314),
- CPU_TYPE_ENTRY(8315),
- CPU_TYPE_ENTRY(8321),
- CPU_TYPE_ENTRY(8323),
- CPU_TYPE_ENTRY(8343),
- CPU_TYPE_ENTRY(8347_TBGA_),
- CPU_TYPE_ENTRY(8347_PBGA_),
- CPU_TYPE_ENTRY(8349),
- CPU_TYPE_ENTRY(8358_TBGA_),
- CPU_TYPE_ENTRY(8358_PBGA_),
- CPU_TYPE_ENTRY(8360),
- CPU_TYPE_ENTRY(8377),
- CPU_TYPE_ENTRY(8378),
- CPU_TYPE_ENTRY(8379),
-};
-
int checkcpu(void)
{
volatile immap_t *immr;
@@ -70,6 +44,29 @@ int checkcpu(void)
char buf[32];
int i;
+#define CPU_TYPE_ENTRY(x) {#x, SPR_##x}
+ const struct cpu_type {
+ char name[15];
+ u32 partid;
+ } cpu_type_list [] = {
+ CPU_TYPE_ENTRY(8311),
+ CPU_TYPE_ENTRY(8313),
+ CPU_TYPE_ENTRY(8314),
+ CPU_TYPE_ENTRY(8315),
+ CPU_TYPE_ENTRY(8321),
+ CPU_TYPE_ENTRY(8323),
+ CPU_TYPE_ENTRY(8343),
+ CPU_TYPE_ENTRY(8347_TBGA_),
+ CPU_TYPE_ENTRY(8347_PBGA_),
+ CPU_TYPE_ENTRY(8349),
+ CPU_TYPE_ENTRY(8358_TBGA_),
+ CPU_TYPE_ENTRY(8358_PBGA_),
+ CPU_TYPE_ENTRY(8360),
+ CPU_TYPE_ENTRY(8377),
+ CPU_TYPE_ENTRY(8378),
+ CPU_TYPE_ENTRY(8379),
+ };
+
immr = (immap_t *)CFG_IMMR;
puts("CPU: ");
Kim
next prev parent reply other threads:[~2008-03-28 17:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-28 15:19 [U-Boot-Users] [PATCH 3/3] mpc83xx: cleanup System Part and Revision ID Register (SPRIDR) code Kim Phillips
2008-03-28 15:34 ` Joakim Tjernlund
2008-03-28 17:29 ` Kim Phillips [this message]
2008-03-28 20:01 ` Joakim Tjernlund
2008-03-28 22:41 ` Kim Phillips
2008-03-28 23:12 ` Grant Likely
2008-03-28 23:27 ` Joakim Tjernlund
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=20080328122933.d0489663.kim.phillips@freescale.com \
--to=kim.phillips@freescale.com \
--cc=u-boot@lists.denx.de \
/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.