aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasant Hegde <hegdevasant@linux.vnet.ibm.com>2017-04-02 16:37:27 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-04-05 12:30:44 +1000
commit810aaf1173a056414295eab22cf32ba6833951b0 (patch)
tree82cea405eb75a7c445ca33b41ad37b3031efc6a8
parent01b01804121ed34f499afe011b8461f29f171dba (diff)
downloadskiboot-810aaf1173a056414295eab22cf32ba6833951b0.zip
skiboot-810aaf1173a056414295eab22cf32ba6833951b0.tar.gz
skiboot-810aaf1173a056414295eab22cf32ba6833951b0.tar.bz2
hdat: Read description from ibm, vpd binary blob
In P8, for few FRU's we hardcoded description table (I don't call the reason behind this). Hence on newers system, for most devices description propetry under /vpd contains "Unknown". Hence lets read description from vpd blob. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r--hdata/test/p8-840-spira.dts6
-rw-r--r--hdata/test/p81-811.spira.dts10
-rw-r--r--hdata/vpd.c14
3 files changed, 18 insertions, 12 deletions
diff --git a/hdata/test/p8-840-spira.dts b/hdata/test/p8-840-spira.dts
index 7db2932..0f12745 100644
--- a/hdata/test/p8-840-spira.dts
+++ b/hdata/test/p8-840-spira.dts
@@ -738,7 +738,7 @@
card-type = [00];
hw-characteristics = [00];
ccin = "54E1";
- description = "Unknown";
+ description = "06-WAY PROC CUOD";
ibm,chip-id = <0x0>;
};
@@ -755,7 +755,7 @@
card-type = [00];
hw-characteristics = [00];
ccin = "54E1";
- description = "Unknown";
+ description = "06-WAY PROC CUOD";
ibm,chip-id = <0x1>;
};
@@ -821,7 +821,7 @@
card-type = [80 b5 00];
hw-characteristics = [00];
ccin = "2B08";
- description = "Unknown";
+ description = "CEC OP PANEL ";
};
power-supply@3102 {
diff --git a/hdata/test/p81-811.spira.dts b/hdata/test/p81-811.spira.dts
index c9e3d2c..cdbca66 100644
--- a/hdata/test/p81-811.spira.dts
+++ b/hdata/test/p81-811.spira.dts
@@ -1911,7 +1911,7 @@
card-type = [00];
hw-characteristics = [00];
ccin = "54E8";
- description = "Unknown";
+ description = "10-WAY PROC CUOD";
ibm,chip-id = <0x0>;
};
@@ -1928,7 +1928,7 @@
card-type = [00];
hw-characteristics = [00];
ccin = "54E8";
- description = "Unknown";
+ description = "10-WAY PROC CUOD";
ibm,chip-id = <0x1>;
};
@@ -1945,7 +1945,7 @@
card-type = [00];
hw-characteristics = [00];
ccin = "54E8";
- description = "Unknown";
+ description = "10-WAY PROC CUOD";
ibm,chip-id = <0x10>;
};
@@ -1962,7 +1962,7 @@
card-type = [00];
hw-characteristics = [00];
ccin = "54E8";
- description = "Unknown";
+ description = "10-WAY PROC CUOD";
ibm,chip-id = <0x11>;
};
@@ -2016,7 +2016,7 @@
card-type = [80 b5 00];
hw-characteristics = [00];
ccin = "2B08";
- description = "Unknown";
+ description = "CEC OP PANEL ";
};
power-supply@3100 {
diff --git a/hdata/vpd.c b/hdata/vpd.c
index 1533f3f..6cb9bec 100644
--- a/hdata/vpd.c
+++ b/hdata/vpd.c
@@ -317,10 +317,16 @@ static void vpd_vini_parse(struct dt_node *node,
dt_add_property_string(node,
"description", cinfo->description);
} else {
- dt_add_property_string(node, "description", "Unknown");
- prlog(PR_WARNING,
- "VPD: CCIN desc not available for: %s\n",
- (char *)kw);
+ kw = vpd_find(fruvpd, fruvpd_sz, "VINI", "DR", &sz);
+ if (kw) {
+ dt_add_property_nstr(node,
+ "description", kw, sz);
+ } else {
+ dt_add_property_string(node, "description", "Unknown");
+ prlog(PR_WARNING,
+ "VPD: CCIN desc not available for: %s\n",
+ (char *)kw);
+ }
}
}