xref: /rk3399_ARM-atf/plat/mediatek/drivers/spm/mt8189/mt_spm_conservation.h (revision af0370f25a6663a0d737bbfb3985df4232eaaa55)
1*5f748b3cSKun Lu /*
2*5f748b3cSKun Lu  * Copyright (c) 2025, Mediatek Inc. All rights reserved.
3*5f748b3cSKun Lu  *
4*5f748b3cSKun Lu  * SPDX-License-Identifier: BSD-3-Clause
5*5f748b3cSKun Lu  */
6*5f748b3cSKun Lu 
7*5f748b3cSKun Lu #ifndef MT_SPM_CONSERVATION_H
8*5f748b3cSKun Lu #define MT_SPM_CONSERVATION_H
9*5f748b3cSKun Lu 
10*5f748b3cSKun Lu #include <mt_spm.h>
11*5f748b3cSKun Lu #include <mt_spm_internal.h>
12*5f748b3cSKun Lu 
13*5f748b3cSKun Lu int spm_conservation(int state_id, uint32_t ext_opand,
14*5f748b3cSKun Lu 		     struct spm_lp_scen *spm_lp, uint32_t resource_req);
15*5f748b3cSKun Lu 
16*5f748b3cSKun Lu void spm_conservation_finish(int state_id, uint32_t ext_opand,
17*5f748b3cSKun Lu 			     struct spm_lp_scen *spm_lp,
18*5f748b3cSKun Lu 			     struct wake_status **status);
19*5f748b3cSKun Lu 
20*5f748b3cSKun Lu int spm_conservation_get_result(struct wake_status **res);
21*5f748b3cSKun Lu 
22*5f748b3cSKun Lu int spm_conservation_fw_run(uint32_t first, void *pwrctrl);
23*5f748b3cSKun Lu 
24*5f748b3cSKun Lu int spm_conservation_wakeup_obs(int is_set, int cat, uint32_t wake_src_bits);
25*5f748b3cSKun Lu 
26*5f748b3cSKun Lu #endif /* MT_SPM_CONSERVATION_H */
27