summaryrefslogtreecommitdiff
path: root/plat/rockchip/common/plat_topology.c
diff options
context:
space:
mode:
Diffstat (limited to 'plat/rockchip/common/plat_topology.c')
-rw-r--r--plat/rockchip/common/plat_topology.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/plat/rockchip/common/plat_topology.c b/plat/rockchip/common/plat_topology.c
index a31e4103..4987eeb2 100644
--- a/plat/rockchip/common/plat_topology.c
+++ b/plat/rockchip/common/plat_topology.c
@@ -24,7 +24,11 @@ int plat_core_pos_by_mpidr(u_register_t mpidr)
unsigned int cluster_id, cpu_id;
cpu_id = mpidr & MPIDR_AFFLVL_MASK;
+#ifdef PLAT_RK_MPIDR_CLUSTER_MASK
+ cluster_id = mpidr & PLAT_RK_MPIDR_CLUSTER_MASK;
+#else
cluster_id = mpidr & MPIDR_CLUSTER_MASK;
+#endif
cpu_id += (cluster_id >> PLAT_RK_CLST_TO_CPUID_SHIFT);