1 /*
2  * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #include <platform_def.h>
8 
9 #include <arch.h>
10 #include <lib/psci/psci.h>
11 
plat_get_aff_count(unsigned int aff_lvl,unsigned long mpidr)12 unsigned int plat_get_aff_count(unsigned int aff_lvl, unsigned long mpidr)
13 {
14 	/* Report 1 (absent) instance at levels higher that the cluster level */
15 	if (aff_lvl > MPIDR_AFFLVL1)
16 		return PLATFORM_SYSTEM_COUNT;
17 
18 	if (aff_lvl == MPIDR_AFFLVL1)
19 		return PLATFORM_CLUSTER_COUNT;
20 
21 	return mpidr & 0x100 ? PLATFORM_CLUSTER1_CORE_COUNT :
22 			       PLATFORM_CLUSTER0_CORE_COUNT;
23 }
24 
plat_get_aff_state(unsigned int aff_lvl,unsigned long mpidr)25 unsigned int plat_get_aff_state(unsigned int aff_lvl, unsigned long mpidr)
26 {
27 	return aff_lvl <= MPIDR_AFFLVL2 ? PSCI_AFF_PRESENT : PSCI_AFF_ABSENT;
28 }
29 
mt_setup_topology(void)30 int mt_setup_topology(void)
31 {
32 	/* [TODO] Make topology configurable via SCC */
33 	return 0;
34 }
35