diff --git a/plat/imx/imx93/aarch64/plat_helpers.S b/plat/imx/imx93/aarch64/plat_helpers.S deleted file mode 100644 index 9987a5327..000000000 --- a/plat/imx/imx93/aarch64/plat_helpers.S +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2022-2023 NXP - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#include -#include - -#include - - .globl plat_is_my_cpu_primary - .globl plat_my_core_pos - .globl plat_calc_core_pos - .globl platform_mem_init - - /* ------------------------------------------------------ - * Helper macro that reads the part number of the current - * CPU and jumps to the given label if it matches the CPU - * MIDR provided. - * - * Clobbers x0. - * ------------------------------------------------------ - */ - .macro jump_if_cpu_midr _cpu_midr, _label - - mrs x0, midr_el1 - ubfx x0, x0, MIDR_PN_SHIFT, #12 - cmp w0, #((\_cpu_midr >> MIDR_PN_SHIFT) & MIDR_PN_MASK) - b.eq \_label - - .endm - - /* ---------------------------------------------- - * unsigned int plat_is_my_cpu_primary(void); - * This function checks if this is the primary CPU - * ---------------------------------------------- - */ -func plat_is_my_cpu_primary - mrs x0, mpidr_el1 - mov_imm x1, MPIDR_AFFINITY_MASK - and x0, x0, x1 - cmp x0, #PLAT_PRIMARY_CPU - cset x0, eq - ret -endfunc plat_is_my_cpu_primary - - /* ---------------------------------------------- - * unsigned int plat_my_core_pos(void) - * This function uses the plat_calc_core_pos() - * to get the index of the calling CPU. - * ---------------------------------------------- - */ -func plat_my_core_pos - mrs x0, mpidr_el1 - mov x1, #MPIDR_AFFLVL_MASK - and x0, x1, x0, lsr #MPIDR_AFF1_SHIFT - ret -endfunc plat_my_core_pos - - /* - * unsigned int plat_calc_core_pos(uint64_t mpidr) - * helper function to calculate the core position. - * With this function. - */ -func plat_calc_core_pos - mov x1, #MPIDR_AFFLVL_MASK - and x0, x1, x0, lsr #MPIDR_AFF1_SHIFT - ret -endfunc plat_calc_core_pos - -func platform_mem_init - ret -endfunc platform_mem_init diff --git a/plat/imx/imx93/plat_topology.c b/plat/imx/imx93/plat_topology.c deleted file mode 100644 index 739e2b9f3..000000000 --- a/plat/imx/imx93/plat_topology.c +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2022-2023 NXP - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#include -#include -#include - -const unsigned char imx_power_domain_tree_desc[] = { - PWR_DOMAIN_AT_MAX_LVL, - PLATFORM_CLUSTER_COUNT, - PLATFORM_CLUSTER0_CORE_COUNT, -}; - -const unsigned char *plat_get_power_domain_tree_desc(void) -{ - return imx_power_domain_tree_desc; -} - -/* - * Only one cluster is planned for i.MX9 family, no need - * to consider the cluster id - */ -int plat_core_pos_by_mpidr(u_register_t mpidr) -{ - unsigned int cpu_id; - - mpidr &= MPIDR_AFFINITY_MASK; - - if (mpidr & ~(MPIDR_CLUSTER_MASK | MPIDR_CPU_MASK)) { - return -1; - } - - cpu_id = MPIDR_AFFLVL1_VAL(mpidr); - - return cpu_id; -}