blob: 0a0cf8d78b4c164077c66ac3a3e31a30fb88af51 [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
7#include <arch.h>
8#include <platform_def.h>
9#include <psci.h>
10
11unsigned 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
24unsigned 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
29int mt_setup_topology(void)
30{
31 /* [TODO] Make topology configurable via SCC */
32 return 0;
33}