blob: 3dd818e03f5e24106cf98e5103f0a5a2c9ef0fda [file] [log] [blame]
Jorge Ramirez-Ortiza29d9a62017-06-28 10:11:31 +02001/*
2 * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include <arch.h>
8#include <plat_arm.h>
9#include <psci.h>
10#include "platform_def.h"
11
12const unsigned char hisi_power_domain_tree_desc[] = {
13 PLATFORM_CLUSTER_COUNT,
14 PLATFORM_CORE_COUNT,
15};
16
17const unsigned char *plat_get_power_domain_tree_desc(void)
18{
19 return hisi_power_domain_tree_desc;
20}
21
22int plat_core_pos_by_mpidr(u_register_t mpidr)
23{
24 if (mpidr & MPIDR_CLUSTER_MASK)
25 return -1;
26
27 if ((mpidr & MPIDR_CPU_MASK) >= PLATFORM_CORE_COUNT)
28 return -1;
29
30 return plat_arm_calc_core_pos(mpidr);
31}