arm-trusted-firmware/plat/mediatek/drivers/cpu_pm/topology/inc/pwr_topology.h
Kai Liang da54c72436 feat(mt8196): add topology module for power management
Add topology module to support CPU power state control.

Signed-off-by: Kai Liang <kai.liang@mediatek.com>
Change-Id: I0cc1e5a426762b1b29bff1e940e077643da02e5e
2025-01-22 11:51:16 +08:00

35 lines
711 B
C

/*
* Copyright (c) 2025, MediaTek Inc. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef PWR_TOPOLOGY_H
#define PWR_TOPOLOGY_H
#include <lib/pm/mtk_pm.h>
enum pwr_domain_status {
PWR_DOMAIN_ON,
PWR_DOMAIN_OFF,
PWR_DOMAIN_SMP_ON,
PWR_DOMAIN_SMP_OFF,
};
struct pwr_toplogy {
unsigned int cur_group_bit;
unsigned int group;
};
typedef int (*afflv_prepare)(unsigned int,
const struct mtk_cpupm_pwrstate *,
const struct pwr_toplogy *);
void pwr_topology_init(void);
unsigned int pwr_domain_coordination(enum pwr_domain_status pwr,
const mtk_pstate_type psci_state,
const struct mtk_cpupm_pwrstate *state,
afflv_prepare fn);
#endif