[Skiboot] [PATCH 3/3] hdata: Add wafer-location property
Vasant Hegde
hegdevasant at linux.vnet.ibm.com
Wed Sep 13 15:24:25 AEST 2017
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 at wsp xscom at 623fc00000000]# lsprop ecid
ecid 019a00d4 03100718 852c0000 00fd7911
[root at wsp xscom at 623fc00000000]# lsprop wafer-location
wafer-location 00000085 0000002c
Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
hdata/spira.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hdata/spira.c b/hdata/spira.c
index 2e44209..bed7a21 100644
--- a/hdata/spira.c
+++ b/hdata/spira.c
@@ -411,6 +411,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)
--
2.9.3
More information about the Skiboot
mailing list