xref: /rk3399_ARM-atf/plat/mediatek/drivers/spm/mt8189/rules.mk (revision 083cfadb6a246c89e306f5a83d05cad90e3bab1f)
1*083cfadbSKun Lu#
2*083cfadbSKun Lu# Copyright (c) 2025, MediaTek Inc. All rights reserved.
3*083cfadbSKun Lu#
4*083cfadbSKun Lu# SPDX-License-Identifier: BSD-3-Clause
5*083cfadbSKun Lu#
6*083cfadbSKun Lu
7*083cfadbSKun LuLOCAL_DIR := $(call GET_LOCAL_DIR)
8*083cfadbSKun Lu
9*083cfadbSKun LuMODULE := spm_${MTK_SOC}
10*083cfadbSKun Lu
11*083cfadbSKun LuLOCAL_SRCS-${CONFIG_MTK_SPM_SUPPORT} := ${LOCAL_DIR}/mt_spm.c
12*083cfadbSKun LuLOCAL_SRCS-${CONFIG_MTK_SPM_SUPPORT} += ${LOCAL_DIR}/mt_spm_conservation.c
13*083cfadbSKun LuLOCAL_SRCS-${CONFIG_MTK_SPM_SUPPORT} += ${LOCAL_DIR}/mt_spm_internal.c
14*083cfadbSKun LuLOCAL_SRCS-${MT_SPM_FEATURE_SUPPORT} += ${LOCAL_DIR}/mt_plat_spm_setting.c
15*083cfadbSKun LuLOCAL_SRCS-${MT_SPM_FEATURE_SUPPORT} += ${LOCAL_DIR}/mt_spm_idle.c
16*083cfadbSKun LuLOCAL_SRCS-${MT_SPM_FEATURE_SUPPORT} += ${LOCAL_DIR}/mt_spm_suspend.c
17*083cfadbSKun LuLOCAL_SRCS-${MT_SPM_FEATURE_SUPPORT} += ${LOCAL_DIR}/mt_spm_stats.c
18*083cfadbSKun LuLOCAL_SRCS-${MT_SPM_FEATURE_SUPPORT} += ${LOCAL_DIR}/constraints/mt_spm_rc_api.c
19*083cfadbSKun LuLOCAL_SRCS-${MT_SPM_FEATURE_SUPPORT} += ${LOCAL_DIR}/constraints/mt_spm_rc_bus26m.c
20*083cfadbSKun LuLOCAL_SRCS-${MT_SPM_FEATURE_SUPPORT} += ${LOCAL_DIR}/constraints/mt_spm_rc_vcore.c
21*083cfadbSKun LuLOCAL_SRCS-${MT_SPM_FEATURE_SUPPORT} += ${LOCAL_DIR}/constraints/mt_spm_rc_syspll.c
22*083cfadbSKun LuLOCAL_SRCS-${MTK_SPM_PMIC_LP_SUPPORT} += ${LOCAL_DIR}/mt_spm_pmic_lp.c
23*083cfadbSKun LuLOCAL_SRCS-${MT_SPM_FEATURE_SUPPORT} += ${LOCAL_DIR}/mt_spm_hwreq.c
24*083cfadbSKun LuLOCAL_SRCS-${MT_SPM_FEATURE_SUPPORT} += ${LOCAL_DIR}/mt_spm_cond.c
25*083cfadbSKun Lu
26*083cfadbSKun Luifneq (${PMIC_GS_DUMP_VER},)
27*083cfadbSKun LuLOCAL_SRCS-y += ${LOCAL_DIR}/pmic_gs/mt_spm_pmic_gs_suspend.c
28*083cfadbSKun LuLOCAL_SRCS-y += ${LOCAL_DIR}/pmic_gs/mt_spm_pmic_gs_sodi3.c
29*083cfadbSKun LuLOCAL_SRCS-y += ${LOCAL_DIR}/pmic_gs/mt_spm_pmic_gs_dpidle.c
30*083cfadbSKun Luendif
31*083cfadbSKun Lu
32*083cfadbSKun LuLOCAL_SRCS-${CONFIG_MTK_VCOREDVFS_SUPPORT} += ${LOCAL_DIR}/mt_spm_vcorefs.c
33*083cfadbSKun LuLOCAL_SRCS-${CONFIG_MTK_VCOREDVFS_SUPPORT} += ${LOCAL_DIR}/mt_vcore_dvfsrc_plat.c
34*083cfadbSKun Lu
35*083cfadbSKun Lu$(eval $(call MAKE_MODULE,$(MODULE),$(LOCAL_SRCS-y),$(MTK_BL)))
36*083cfadbSKun Lu$(eval $(call add_defined_option,CONFIG_MTK_VCOREDVFS_SUPPORT))
37*083cfadbSKun Lu$(eval $(call add_defined_option,MTK_VCORE_DVFS_PAUSE))
38