From 792a5af66da48b27a11fa7d6cf16ba32ec46c5a1 Mon Sep 17 00:00:00 2001 From: Michael Ellerman Date: Tue, 21 Mar 2006 20:46:09 +1100 Subject: [PATCH] --- yaml --- r: 22963 b: refs/heads/master c: 289f1c74a9b527a816f63092e79a5412cc0352a2 h: refs/heads/master i: 22961: 90878cdf9bae47782fc3853d4856bfd82a2278f1 22959: 4699f99917d9dd94bd4b6e59af45d30cc12aed03 v: v3 --- [refs] | 2 +- trunk/arch/powerpc/platforms/iseries/setup.c | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 1755e8315666..7e22167230aa 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 584fc6d111c34a9a2512f6c7652dff29232bf70d +refs/heads/master: 289f1c74a9b527a816f63092e79a5412cc0352a2 diff --git a/trunk/arch/powerpc/platforms/iseries/setup.c b/trunk/arch/powerpc/platforms/iseries/setup.c index 127af3b0ba82..8fe7237bc46f 100644 --- a/trunk/arch/powerpc/platforms/iseries/setup.c +++ b/trunk/arch/powerpc/platforms/iseries/setup.c @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include @@ -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_dt *dt, unsigned long phys_mem_size) dt_prop_u32(dt, "#address-cells", 2); dt_prop_u32(dt, "#size-cells", 2); + dt_model(dt); /* /memory */ dt_start_node(dt, "memory@0");