developer | 550bf5e | 2016-07-11 16:05:23 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved. |
| 3 | * |
dp-arm | fa3cf0b | 2017-05-03 09:38:09 +0100 | [diff] [blame] | 4 | * SPDX-License-Identifier: BSD-3-Clause |
developer | 550bf5e | 2016-07-11 16:05:23 +0800 | [diff] [blame] | 5 | */ |
| 6 | |
developer | 550bf5e | 2016-07-11 16:05:23 +0800 | [diff] [blame] | 7 | #include <platform_def.h> |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 8 | |
| 9 | #include <arch.h> |
| 10 | #include <lib/psci/psci.h> |
developer | 550bf5e | 2016-07-11 16:05:23 +0800 | [diff] [blame] | 11 | |
| 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 | |
| 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 | |
| 30 | int mt_setup_topology(void) |
| 31 | { |
| 32 | /* [TODO] Make topology configurable via SCC */ |
| 33 | return 0; |
| 34 | } |