From 086f3277bc3f50afe07f6ab07562ba422fc5baab Mon Sep 17 00:00:00 2001 From: Stewart Smith Date: Fri, 6 Apr 2018 15:16:45 +1000 Subject: hdata/spira: parse vpd to add part-number and serial-number to xscom@ 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 Reviewed-by: Vasant Hegde Signed-off-by: Stewart Smith --- 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(-) (limited to 'hdata') diff --git a/hdata/spira.c b/hdata/spira.c index 19f456a..360b7c7 100644 --- a/hdata/spira.c +++ b/hdata/spira.c @@ -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); + } } /* diff --git a/hdata/test/p8-840-spira.dts b/hdata/test/p8-840-spira.dts index a1c238f..62a2f52 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 e3224b0..ba9b355 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>; -- cgit v1.1