From 4b22457e783762e8532c7219d9f774b3df3f20a2 Mon Sep 17 00:00:00 2001 From: Vasant Hegde Date: Wed, 13 Sep 2017 10:54:25 +0530 Subject: 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 Signed-off-by: Stewart Smith --- hdata/spira.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'hdata') 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) -- cgit v1.1