1 /* 2 * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #include <arch.h> 8 #include <psci.h> 9 #include "platform_def.h" 10 #include "plat_private.h" 11 12 const unsigned char hisi_power_domain_tree_desc[] = { 13 PLATFORM_CLUSTER_COUNT, 14 PLATFORM_CORE_COUNT, 15 }; 16 17 const unsigned char *plat_get_power_domain_tree_desc(void) 18 { 19 return hisi_power_domain_tree_desc; 20 } 21 22 int 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 poplar_calc_core_pos(mpidr); 31 } 32