summaryrefslogtreecommitdiffstats
path: root/hdata
diff options
context:
space:
mode:
authorVasant Hegde <hegdevasant@linux.vnet.ibm.com>2017-09-13 10:54:23 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-09-19 04:16:53 -0500
commit6fa9cea1638dcada59d27e924616fac509cf25f8 (patch)
tree6d447762c4e1d5e1570bd1068a169f24b49ffad5 /hdata
parentb7f41322c61ea903f298544463d386a8a9cc6de5 (diff)
downloadtalos-skiboot-6fa9cea1638dcada59d27e924616fac509cf25f8.tar.gz
talos-skiboot-6fa9cea1638dcada59d27e924616fac509cf25f8.zip
hdata: Add ecid property
Add ecid property under xscom node. Sample output: ------------- [root@wsp xscom@623fc00000000]# lsprop ecid ecid 019a00d4 03100718 852c0000 00fd7911 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.c17
-rw-r--r--hdata/spira.h12
2 files changed, 28 insertions, 1 deletions
diff --git a/hdata/spira.c b/hdata/spira.c
index 5e3d6ccc..2d41e918 100644
--- a/hdata/spira.c
+++ b/hdata/spira.c
@@ -408,6 +408,22 @@ static void add_vas_node(struct dt_node *np, int idx)
dt_add_property_cells(vas, "ibm,vas-id", idx);
}
+static void add_ecid_data(const struct HDIF_common_hdr *hdr,
+ struct dt_node *xscom)
+{
+ uint32_t size = 0;
+ struct sppcrd_ecid *ecid;
+ const struct HDIF_array_hdr *ec_hdr;
+
+ ec_hdr = HDIF_get_idata(hdr, SPPCRD_IDATA_EC_LEVEL, &size);
+ if (!ec_hdr || !size)
+ return;
+
+ ecid = (void *)ec_hdr + be32_to_cpu(ec_hdr->offset);
+ dt_add_property_u64s(xscom, "ecid", be64_to_cpu(ecid->low),
+ be64_to_cpu(ecid->high));
+}
+
static void add_xscom_add_pcia_assoc(struct dt_node *np, uint32_t pcid)
{
const struct HDIF_common_hdr *hdr;
@@ -526,6 +542,7 @@ static bool add_xscom_sppcrd(uint64_t xscom_base)
add_xive_node(np);
parse_i2c_devs(hdif, SPPCRD_IDATA_HOST_I2C, np);
add_vas_node(np, i);
+ add_ecid_data(hdif, np);
}
/*
diff --git a/hdata/spira.h b/hdata/spira.h
index f850c790..49acf5c2 100644
--- a/hdata/spira.h
+++ b/hdata/spira.h
@@ -1,4 +1,4 @@
-/* Copyright 2013-2014 IBM Corp.
+/* Copyright 2013-2017 IBM Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1183,6 +1183,16 @@ struct sppcrd_smp_link {
__be16 gpu_slca;
} __packed;
+/* Idata index 8 : chip EC Level array */
+#define SPPCRD_IDATA_EC_LEVEL 8
+
+struct sppcrd_ecid {
+ __be32 chip_id;
+ __be32 ec_level;
+ __be64 low; /* Processor ECID bit 0-63 */
+ __be64 high; /* Processor ECID bit 64-127 */
+} __packed;
+
/*
* Host Services Data.
*/
OpenPOWER on IntegriCloud