blob: 7425d2667ecca1738e32e6310172e5e7533bcf45 [file] [log] [blame]
developer550bf5e2016-07-11 16:05:23 +08001/*
2 * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
3 *
dp-armfa3cf0b2017-05-03 09:38:09 +01004 * SPDX-License-Identifier: BSD-3-Clause
developer550bf5e2016-07-11 16:05:23 +08005 */
6
developer550bf5e2016-07-11 16:05:23 +08007#include <platform_def.h>
Antonio Nino Diaze0f90632018-12-14 00:18:21 +00008
9#include <arch.h>
10#include <lib/psci/psci.h>
developer550bf5e2016-07-11 16:05:23 +080011
12unsigned 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
25unsigned 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
30int mt_setup_topology(void)
31{
32 /* [TODO] Make topology configurable via SCC */
33 return 0;
34}