Skip to content

Commit

Permalink
hdata/spira: parse vpd to add part-number and serial-number to xscom@…
Browse files Browse the repository at this point in the history
… node

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>
Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
stewartsmith committed Apr 11, 2018
1 parent 4d359aa commit 086f327
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hdata/spira.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,9 +557,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);
}
}

/*
Expand Down
4 changes: 4 additions & 0 deletions hdata/test/p8-840-spira.dts
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
Expand Down Expand Up @@ -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>;
Expand Down
8 changes: 8 additions & 0 deletions hdata/test/p81-811.spira.dts
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
Expand Down Expand Up @@ -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>;
Expand Down Expand Up @@ -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>;
Expand Down Expand Up @@ -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>;
Expand Down

0 comments on commit 086f327

Please sign in to comment.