Add topology helper to get parent node
It was not possible to get a parent node given an MPIDR
of the CPU using the current topology APIs. This patch adds
the `tftf_get_parent_node_from_mpidr()` API to achieve the same.
Change-Id: I818f1e628689928293c1fdb85606885e851a5785
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
diff --git a/include/plat/common/plat_topology.h b/include/plat/common/plat_topology.h
index 0da0b5e..0ca5eff 100644
--- a/include/plat/common/plat_topology.h
+++ b/include/plat/common/plat_topology.h
@@ -161,6 +161,16 @@
*/
unsigned int tftf_get_mpidr_from_node(unsigned int cpu_node);
+
+/*
+ * Returns the index corresponding to the parent power domain at `pwrlvl` of the
+ * CPU specified by `mpidr`. Returns POWER_DOMAIN_INIT if any of input arguments
+ * are incorrect.
+ */
+unsigned int tftf_get_parent_node_from_mpidr(unsigned int mpidr,
+ unsigned int pwrlvl);
+
+
/*
* Query the platform topology to find another CPU than the one specified
* as an argument.