aboutsummaryrefslogtreecommitdiff
path: root/hdata
diff options
context:
space:
mode:
authorVasant Hegde <hegdevasant@linux.vnet.ibm.com>2017-09-13 10:54:25 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-09-19 04:16:53 -0500
commit4b22457e783762e8532c7219d9f774b3df3f20a2 (patch)
tree65dd614635a49d9b66855f54524101d17b930cc6 /hdata
parentc68fcc866a7b4064209c4fca85246b6ac1780451 (diff)
downloadskiboot-4b22457e783762e8532c7219d9f774b3df3f20a2.zip
skiboot-4b22457e783762e8532c7219d9f774b3df3f20a2.tar.gz
skiboot-4b22457e783762e8532c7219d9f774b3df3f20a2.tar.bz2
hdata: Add wafer-location property
Extract wafer-location from ECID and add property under xscom node. bits 64:71 are the chip x location (7:0) bits 72:79 are the chip y location (7:0) Sample output: ------------- [root@wsp xscom@623fc00000000]# lsprop ecid ecid 019a00d4 03100718 852c0000 00fd7911 [root@wsp xscom@623fc00000000]# lsprop wafer-location wafer-location 00000085 0000002c Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hdata')
-rw-r--r--hdata/spira.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hdata/spira.c b/hdata/spira.c
index a652d63..5253768 100644
--- a/hdata/spira.c
+++ b/hdata/spira.c
@@ -447,6 +447,10 @@ static void add_ecid_data(const struct HDIF_common_hdr *hdr,
}
wafer_id[10] = '\0';
dt_add_property_nstr(xscom, "wafer-id", wafer_id, 10);
+
+ dt_add_property_cells(xscom, "wafer-location",
+ (u32)((be64_to_cpu(ecid->high) >> 56) & 0xff),
+ (u32)((be64_to_cpu(ecid->high) >> 48) & 0xff));
}
static void add_xscom_add_pcia_assoc(struct dt_node *np, uint32_t pcid)