[Skiboot] [PATCH 1/6] hdata: Add location code property to xscom node

Mahesh J Salgaonkar mahesh at linux.vnet.ibm.com
Mon Dec 11 16:30:59 AEDT 2017


From: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>

This patch adds chip location code property to xscom node.

Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
Signed-off-by: Mahesh Salgaonkar <mahesh at linux.vnet.ibm.com>
---
 hdata/spira.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hdata/spira.c b/hdata/spira.c
index 11d3ade..66493c8 100644
--- a/hdata/spira.c
+++ b/hdata/spira.c
@@ -505,6 +505,7 @@ static bool add_xscom_sppcrd(uint64_t xscom_base)
 	for_each_ntuple_idx(&spira.ntuples.proc_chip, hdif, i,
 			    SPPCRD_HDIF_SIG) {
 		const struct sppcrd_chip_info *cinfo;
+		const struct spira_fru_id *fru_id = NULL;
 		unsigned int csize;
 		u32 ve, version;
 
@@ -548,6 +549,10 @@ static bool add_xscom_sppcrd(uint64_t xscom_base)
 			dt_add_property_cells(vpd_node, "ibm,chip-id",
 					      be32_to_cpu(cinfo->xscom_id));
 
+		fru_id = HDIF_get_idata(hdif, SPPCRD_IDATA_FRU_ID, NULL);
+		if (fru_id)
+			slca_vpd_add_loc_code(np, be16_to_cpu(fru_id->slca_index));
+
 		/* Add module VPD on version A and later */
 		if (version >= 0x000a) {
 			vpd = HDIF_get_idata(hdif, SPPCRD_IDATA_MODULE_VPD,



More information about the Skiboot mailing list