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