From: Michael Ellerman <michael@ellerman.id.au>
To: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@ozlabs.org
Subject: [PATCH 9/11] powerpc: iseries: Add /system-id, /model and /compatible
Date: Tue, 21 Mar 2006 20:46:09 +1100 [thread overview]
Message-ID: <20060321094638.7A28D67BC1@ozlabs.org> (raw)
In-Reply-To: <1142934351.193140.181086235013.qpush@concordia>
Add /system-id, /model and /compatible to the iSeries device tree.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
arch/powerpc/platforms/iseries/setup.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+)
Index: to-merge/arch/powerpc/platforms/iseries/setup.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/iseries/setup.c
+++ to-merge/arch/powerpc/platforms/iseries/setup.c
@@ -50,6 +50,7 @@
#include <asm/iseries/hv_call_xm.h>
#include <asm/iseries/it_lp_queue.h>
#include <asm/iseries/mf.h>
+#include <asm/iseries/it_exp_vpd_panel.h>
#include <asm/iseries/hv_lp_event.h>
#include <asm/iseries/lpar_map.h>
#include <asm/udbg.h>
@@ -888,6 +889,24 @@ void dt_cpus(struct iseries_flat_dt *dt)
dt_end_node(dt);
}
+void dt_model(struct iseries_flat_dt *dt)
+{
+ char buf[16] = "IBM,";
+
+ /* "IBM," + mfgId[2:3] + systemSerial[1:5] */
+ strne2a(buf + 4, xItExtVpdPanel.mfgID + 2, 2);
+ strne2a(buf + 6, xItExtVpdPanel.systemSerial + 1, 5);
+ buf[11] = '\0';
+ dt_prop_str(dt, "system-id", buf);
+
+ /* "IBM," + machineType[0:4] */
+ strne2a(buf + 4, xItExtVpdPanel.machineType, 4);
+ buf[8] = '\0';
+ dt_prop_str(dt, "model", buf);
+
+ dt_prop_str(dt, "compatible", "IBM,iSeries");
+}
+
void build_flat_dt(struct iseries_flat_dt *dt, unsigned long phys_mem_size)
{
u64 tmp[2];
@@ -898,6 +917,7 @@ void build_flat_dt(struct iseries_flat_d
dt_prop_u32(dt, "#address-cells", 2);
dt_prop_u32(dt, "#size-cells", 2);
+ dt_model(dt);
/* /memory */
dt_start_node(dt, "memory@0");
next prev parent reply other threads:[~2006-03-21 9:46 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-21 9:45 [PATCH 1/11] powerpc: Unconfuse htab_bolt_mapping() callers Michael Ellerman
2006-03-21 9:45 ` [PATCH 2/11] powerpc: Remove unused iommu_off logic from pSeries_init_early() Michael Ellerman
2006-03-21 16:15 ` Olof Johansson
2006-03-21 9:45 ` [PATCH 3/11] powerpc: trivial: Cleanup whitespace in cputable.h Michael Ellerman
2006-03-21 9:45 ` [PATCH 4/11] powerpc: Replace platform_is_lpar() with a firmware feature Michael Ellerman
2006-03-22 0:35 ` Stephen Rothwell
2006-03-22 0:48 ` Michael Ellerman
2006-03-21 9:46 ` [PATCH 5/11] powerpc: iseries: mf related cleanups Michael Ellerman
2006-03-22 0:39 ` Stephen Rothwell
2006-03-21 9:46 ` [PATCH 6/11] powerpc: iseries: Remove pointless iSeries_(restart|power_off|halt) Michael Ellerman
2006-03-21 9:46 ` [PATCH 7/11] powerpc: iseries: Make more stuff static in platforms/iseries/mf.c Michael Ellerman
2006-03-21 9:46 ` [PATCH 8/11] powerpc: Add strne2a() to convert a string from EBCDIC to ASCII Michael Ellerman
2006-03-21 18:11 ` Olof Johansson
2006-03-21 18:32 ` Andreas Schwab
2006-03-21 18:43 ` Olof Johansson
2006-03-21 23:25 ` Michael Ellerman
2006-03-21 9:46 ` Michael Ellerman [this message]
2006-03-21 9:46 ` [PATCH 10/11] powerpc: iseries: Add bootargs to /chosen Michael Ellerman
2006-03-21 9:46 ` [PATCH 11/11] powerpc: Remove calculation of io hole Michael Ellerman
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=20060321094638.7A28D67BC1@ozlabs.org \
--to=michael@ellerman.id.au \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.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).