plat_topology.c 809 Bytes
Newer Older
1
/*
Leon Chen's avatar
Leon Chen committed
2
 * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
3
 *
dp-arm's avatar
dp-arm committed
4
 * SPDX-License-Identifier: BSD-3-Clause
5
6
 */

Leon Chen's avatar
Leon Chen committed
7
8
9
#include <arch.h>
#include <platform_def.h>
#include <psci.h>
10

Leon Chen's avatar
Leon Chen committed
11
12
13
14
15
unsigned int plat_get_aff_count(unsigned int aff_lvl, unsigned long mpidr)
{
	/* Report 1 (absent) instance at levels higher that the cluster level */
	if (aff_lvl > MPIDR_AFFLVL1)
		return PLATFORM_SYSTEM_COUNT;
16

Leon Chen's avatar
Leon Chen committed
17
18
	if (aff_lvl == MPIDR_AFFLVL1)
		return PLATFORM_CLUSTER_COUNT;
19

Leon Chen's avatar
Leon Chen committed
20
21
22
	return mpidr & 0x100 ? PLATFORM_CLUSTER1_CORE_COUNT :
			       PLATFORM_CLUSTER0_CORE_COUNT;
}
23

Leon Chen's avatar
Leon Chen committed
24
25
26
27
unsigned int plat_get_aff_state(unsigned int aff_lvl, unsigned long mpidr)
{
	return aff_lvl <= MPIDR_AFFLVL2 ? PSCI_AFF_PRESENT : PSCI_AFF_ABSENT;
}
28

Leon Chen's avatar
Leon Chen committed
29
30
31
32
33
int mt_setup_topology(void)
{
	/* [TODO] Make topology configurable via SCC */
	return 0;
}