xref: /rk3399_ARM-atf/plat/imx/imx9/common/include/imx9_psci_common.h (revision 480e8dd9df291cc0e31695983fa6ff235e1671cd)
1 /*
2  * Copyright 2025 NXP
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef IMX9_PSCI_H
8 #define IMX9_PSCI_H
9 
10 #include <lib/psci/psci.h>
11 
12 #include <platform_def.h>
13 
14 #define CORE_PWR_STATE(state)		((state)->pwr_domain_state[MPIDR_AFFLVL0])
15 #define CLUSTER_PWR_STATE(state)	((state)->pwr_domain_state[MPIDR_AFFLVL1])
16 #define SYSTEM_PWR_STATE(state)		((state)->pwr_domain_state[PLAT_MAX_PWR_LVL])
17 
18 extern uintptr_t secure_entrypoint;
19 extern uint32_t mask_all[IMR_NUM];
20 
21 int imx_validate_ns_entrypoint(uintptr_t ns_entrypoint);
22 void imx_set_cpu_boot_entry(uint32_t core_id, uint64_t boot_entry, uint32_t flag);
23 int imx_pwr_domain_on(u_register_t mpidr);
24 void imx_pwr_domain_on_finish(const psci_power_state_t *target_state);
25 void imx_pwr_domain_off(const psci_power_state_t *target_state);
26 void imx_pwr_domain_suspend(const psci_power_state_t *target_state);
27 void imx_pwr_domain_suspend_finish(const psci_power_state_t *target_state);
28 void imx_pwr_domain_pwr_down(const psci_power_state_t *target_state);
29 
30 #endif /* IMX9_PSCI_H */
31