diff mbox series

[2/3] hdata/spira: parse vpd to add part-number and serial-number to xscom@ node

Message ID 20180406051646.2938-3-stewart@linux.ibm.com
State Accepted
Headers show
Series Fix various FWTS device tree warnings | expand

Commit Message

Stewart Smith April 6, 2018, 5:16 a.m. UTC
From: Stewart Smith <stewart@linux.vnet.ibm.com>

Expected by FWTS and associates our processor with the part/serial
number, which is obviously a good thing for one's own sanity.

Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
---
 hdata/spira.c                | 4 +++-
 hdata/test/p8-840-spira.dts  | 4 ++++
 hdata/test/p81-811.spira.dts | 8 ++++++++
 3 files changed, 15 insertions(+), 1 deletion(-)

Comments

Vasant Hegde April 7, 2018, 11:54 a.m. UTC | #1
On 04/06/2018 10:46 AM, Stewart Smith wrote:
> From: Stewart Smith <stewart@linux.vnet.ibm.com>
> 
> Expected by FWTS and associates our processor with the part/serial
> number, which is obviously a good thing for one's own sanity.
> 
> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>

Looks good to me.

Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>

-Vasant
Stewart Smith April 12, 2018, 6:08 a.m. UTC | #2
Stewart Smith <stewart@linux.ibm.com> writes:
> From: Stewart Smith <stewart@linux.vnet.ibm.com>
>
> Expected by FWTS and associates our processor with the part/serial
> number, which is obviously a good thing for one's own sanity.
>
> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
> ---
>  hdata/spira.c                | 4 +++-
>  hdata/test/p8-840-spira.dts  | 4 ++++
>  hdata/test/p81-811.spira.dts | 8 ++++++++
>  3 files changed, 15 insertions(+), 1 deletion(-)

I've merged in this specific patch as there seemed to be agreement that
it was a good idea, while some sketchy-ness on the others.

Merged to master as of 086f3277bc3f50afe07f6ab07562ba422fc5baab
diff mbox series

Patch

diff --git a/hdata/spira.c b/hdata/spira.c
index 0724dcc42ae9..320ed3b3aaad 100644
--- a/hdata/spira.c
+++ b/hdata/spira.c
@@ -558,9 +558,11 @@  static bool add_xscom_sppcrd(uint64_t xscom_base)
 		if (version >= 0x000a) {
 			vpd = HDIF_get_idata(hdif, SPPCRD_IDATA_MODULE_VPD,
 					     &vpd_sz);
-			if (CHECK_SPPTR(vpd))
+			if (CHECK_SPPTR(vpd)) {
 				dt_add_property(np, "ibm,module-vpd", vpd,
 						vpd_sz);
+				vpd_data_parse(np, vpd, vpd_sz);
+			}
 		}
 
 		/*
diff --git a/hdata/test/p8-840-spira.dts b/hdata/test/p8-840-spira.dts
index a1c238f285cd..62a2f52bc327 100644
--- a/hdata/test/p8-840-spira.dts
+++ b/hdata/test/p8-840-spira.dts
@@ -966,6 +966,8 @@ 
 		ibm,occ-functional-state = <0x1>;
 		ibm,loc-code = "U78C9.001.WZS0CWX-P1-C32";
 		ibm,module-vpd = <0xcafebeef 0x10000 0xa502aa2f>;
+		part-number = "00KV631";
+		serial-number = "YA1932063562";
 		ibm,ccm-node-id = <0x0>;
 		ibm,hw-card-id = <0x0>;
 		ibm,hw-module-id = <0x0>;
@@ -1029,6 +1031,8 @@ 
 		ibm,occ-functional-state = <0x1>;
 		ibm,loc-code = "U78C9.001.WZS0CWX-P1-C32";
 		ibm,module-vpd = <0xcafebeef 0x10000 0x9f87fa41>;
+		part-number = "00KV631";
+		serial-number = "YA1932063562";
 		ibm,ccm-node-id = <0x0>;
 		ibm,hw-card-id = <0x0>;
 		ibm,hw-module-id = <0x0>;
diff --git a/hdata/test/p81-811.spira.dts b/hdata/test/p81-811.spira.dts
index e3224b04fef6..ba9b3551f630 100644
--- a/hdata/test/p81-811.spira.dts
+++ b/hdata/test/p81-811.spira.dts
@@ -2185,6 +2185,8 @@ 
 		ibm,occ-functional-state = <0x1>;
 		ibm,loc-code = "U78CB.001.WZS00AL-P1-C32";
 		ibm,module-vpd = <0xcafebeef 0x10000 0x3e067c18>;
+		part-number = "00KV627";
+		serial-number = "YA1932096951";
 		ibm,ccm-node-id = <0x0>;
 		ibm,hw-card-id = <0x0>;
 		ibm,hw-module-id = <0x0>;
@@ -2248,6 +2250,8 @@ 
 		ibm,occ-functional-state = <0x1>;
 		ibm,loc-code = "U78CB.001.WZS00AL-P1-C32";
 		ibm,module-vpd = <0xcafebeef 0x10000 0x1b85218f>;
+		part-number = "00KV627";
+		serial-number = "YA1932096951";
 		ibm,ccm-node-id = <0x0>;
 		ibm,hw-card-id = <0x0>;
 		ibm,hw-module-id = <0x0>;
@@ -2308,6 +2312,8 @@ 
 		ibm,occ-functional-state = <0x1>;
 		ibm,loc-code = "U78CB.001.WZS00AL-P1-C33";
 		ibm,module-vpd = <0xcafebeef 0x10000 0x36f99ead>;
+		part-number = "00KV627";
+		serial-number = "YA1932096950";
 		ibm,ccm-node-id = <0x0>;
 		ibm,hw-card-id = <0x0>;
 		ibm,hw-module-id = <0x1>;
@@ -2359,6 +2365,8 @@ 
 		ibm,occ-functional-state = <0x1>;
 		ibm,loc-code = "U78CB.001.WZS00AL-P1-C33";
 		ibm,module-vpd = <0xcafebeef 0x10000 0x65fe8f66>;
+		part-number = "00KV627";
+		serial-number = "YA1932096950";
 		ibm,ccm-node-id = <0x0>;
 		ibm,hw-card-id = <0x0>;
 		ibm,hw-module-id = <0x1>;