1 /* 2 * Copyright (c) 2025, Texas Instruments Incorporated - https://www.ti.com/ 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #include <lib/psci/psci.h> 8 9 #include <platform_def.h> 10 11 /* The power domain tree descriptor */ 12 static unsigned char power_domain_tree_desc[] = { 13 PLATFORM_SYSTEM_COUNT, 14 PLATFORM_CLUSTER_COUNT, 15 K3_CLUSTER0_CORE_COUNT, 16 }; 17 18 const unsigned char *plat_get_power_domain_tree_desc(void) 19 { 20 return power_domain_tree_desc; 21 } 22 23 int plat_core_pos_by_mpidr(u_register_t mpidr) 24 { 25 unsigned int core = MPIDR_AFFLVL0_VAL(mpidr); 26 27 if (MPIDR_AFFLVL3_VAL(mpidr) > 0 || 28 MPIDR_AFFLVL2_VAL(mpidr) > 0) { 29 return -1; 30 } 31 32 return core; 33 } 34