1 /* 2 * Copyright (c) 2025, MediaTek Inc. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef PWR_TOPOLOGY_H 8 #define PWR_TOPOLOGY_H 9 10 #include <lib/pm/mtk_pm.h> 11 12 enum pwr_domain_status { 13 PWR_DOMAIN_ON, 14 PWR_DOMAIN_OFF, 15 PWR_DOMAIN_SMP_ON, 16 PWR_DOMAIN_SMP_OFF, 17 }; 18 19 struct pwr_toplogy { 20 unsigned int cur_group_bit; 21 unsigned int group; 22 }; 23 24 typedef int (*afflv_prepare)(unsigned int, 25 const struct mtk_cpupm_pwrstate *, 26 const struct pwr_toplogy *); 27 28 void pwr_topology_init(void); 29 30 unsigned int pwr_domain_coordination(enum pwr_domain_status pwr, 31 const mtk_pstate_type psci_state, 32 const struct mtk_cpupm_pwrstate *state, 33 afflv_prepare fn); 34 35 #endif 36