From 2ce3f083f3999483e202ea6868d55fcb0ad61db1 Mon Sep 17 00:00:00 2001 From: Haren Myneni Date: Wed, 4 Aug 2021 12:50:53 +0530 Subject: hdat/spira: Define ibm, primary-topology-index property per chip HDAT provides Topology ID table and the primary topology location on P10. This primary location points to primary topology entry in ID table which contains the primary topology index and this index is used to define the paste base address per chip. This patch reads Topology ID table and the primary topology location from hdata and retrieves the primary topology index in the ID table. Make this primaty topology index value available with ibm,primary-topology-index property per chip. VAS reads this property to setup paste base address for each chip. Signed-off-by: Haren Myneni Signed-off-by: Vasant Hegde --- core/chip.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'core') diff --git a/core/chip.c b/core/chip.c index a4ba324..2d95b2e 100644 --- a/core/chip.c +++ b/core/chip.c @@ -133,6 +133,9 @@ static void init_chip(struct dt_node *dn) if (lc) chip->loc_code = strdup(lc); + chip->primary_topology = dt_prop_get_u32_def(dn, + "ibm,primary-topology-index", 0xffffffff); + prlog(PR_INFO, "CHIP: Initialised chip %d from %s\n", id, dn->name); chips[id] = chip; } -- cgit v1.1