xref: /rk3399_ARM-atf/plat/mediatek/drivers/spm/mt8188/rules.mk (revision 79c262327aa8ccc1ae5a0ee7f7ead3bf5ce8e022)
145d50759SJames Liao#
245d50759SJames Liao# Copyright (c) 2023, MediaTek Inc. All rights reserved.
345d50759SJames Liao#
445d50759SJames Liao# SPDX-License-Identifier: BSD-3-Clause
545d50759SJames Liao#
645d50759SJames Liao
745d50759SJames LiaoLOCAL_DIR := $(call GET_LOCAL_DIR)
845d50759SJames LiaoMODULE := spm_${MTK_SOC}
945d50759SJames Liao
1045d50759SJames Liaodefine GET_UPPER_DIR
1145d50759SJames Liao$(shell dirname ${LOCAL_DIR})
1245d50759SJames Liaoendef
1345d50759SJames LiaoUPPER_DIR := $(call GET_UPPER_DIR)
1445d50759SJames Liao
15*f299efbeSJames LiaoMT_SPM_FEATURE_SUPPORT := y
1645d50759SJames LiaoMT_SPM_CIRQ_FEATURE_SUPPORT := n
1745d50759SJames LiaoMT_SPMFW_SPM_SRAM_SLEEP_SUPPORT := n
1845d50759SJames LiaoMT_SPM_SSPM_NOTIFIER_SUPPORT := y
1945d50759SJames LiaoMT_SPM_UART_SUSPEND_SUPPORT := n
2045d50759SJames LiaoMT_SPM_RGU_SUPPORT := n
2145d50759SJames Liao
2245d50759SJames LiaoLOCAL_SRCS-y := ${LOCAL_DIR}/mt_spm.c
2345d50759SJames LiaoLOCAL_SRCS-y += ${LOCAL_DIR}/mt_spm_conservation.c
2445d50759SJames LiaoLOCAL_SRCS-y += ${LOCAL_DIR}/mt_spm_internal.c
2545d50759SJames LiaoLOCAL_SRCS-y += ${LOCAL_DIR}/mt_spm_pmic_wrap.c
2645d50759SJames LiaoLOCAL_SRCS-${MT_SPM_FEATURE_SUPPORT} += ${LOCAL_DIR}/mt_spm_cond.c
2745d50759SJames LiaoLOCAL_SRCS-${MT_SPM_FEATURE_SUPPORT} += ${LOCAL_DIR}/mt_spm_idle.c
2845d50759SJames LiaoLOCAL_SRCS-${MT_SPM_FEATURE_SUPPORT} += ${LOCAL_DIR}/mt_spm_suspend.c
2945d50759SJames LiaoLOCAL_SRCS-${MT_SPM_FEATURE_SUPPORT} += ${LOCAL_DIR}/constraints/mt_spm_rc_api.c
3045d50759SJames LiaoLOCAL_SRCS-${MT_SPM_FEATURE_SUPPORT} += ${LOCAL_DIR}/constraints/mt_spm_rc_bus26m.c
3145d50759SJames LiaoLOCAL_SRCS-${MT_SPM_FEATURE_SUPPORT} += ${LOCAL_DIR}/constraints/mt_spm_rc_cpu_buck_ldo.c
3245d50759SJames LiaoLOCAL_SRCS-${MT_SPM_FEATURE_SUPPORT} += ${LOCAL_DIR}/constraints/mt_spm_rc_dram.c
3345d50759SJames LiaoLOCAL_SRCS-${MT_SPM_FEATURE_SUPPORT} += ${LOCAL_DIR}/constraints/mt_spm_rc_syspll.c
3445d50759SJames LiaoLOCAL_SRCS-${MT_SPM_SSPM_NOTIFIER_SUPPORT} += ${UPPER_DIR}/version/notifier/v1/mt_spm_sspm_notifier.c
3545d50759SJames Liao
3645d50759SJames Liaoifeq (${MT_SPM_FEATURE_SUPPORT},n)
3745d50759SJames Liao$(eval $(call add_define,MTK_PLAT_SPM_UNSUPPORT))
3845d50759SJames Liaoendif
3945d50759SJames Liao
4045d50759SJames Liaoifeq (${MT_SPM_CIRQ_FEATURE_SUPPORT},n)
4145d50759SJames Liao$(eval $(call add_define,MTK_PLAT_CIRQ_UNSUPPORT))
4245d50759SJames Liaoendif
4345d50759SJames Liao
4445d50759SJames Liaoifeq (${MT_SPMFW_SPM_SRAM_SLEEP_SUPPORT},n)
4545d50759SJames Liao$(eval $(call add_define,MTK_PLAT_SPM_SRAM_SLP_UNSUPPORT))
4645d50759SJames Liaoendif
4745d50759SJames Liao
4845d50759SJames Liaoifeq (${MT_SPM_SSPM_NOTIFIER_SUPPORT},n)
4945d50759SJames Liao$(eval $(call add_define,MTK_PLAT_SPM_SSPM_NOTIFIER_UNSUPPORT))
5045d50759SJames Liaoendif
5145d50759SJames Liao
5245d50759SJames Liaoifeq (${MT_SPM_UART_SUSPEND_SUPPORT},n)
5345d50759SJames Liao$(eval $(call add_define,MTK_PLAT_SPM_UART_UNSUPPORT))
5445d50759SJames Liaoendif
5545d50759SJames Liao
5645d50759SJames Liaoifeq ($(MTK_VOLTAGE_BIN_VCORE),y)
5745d50759SJames Liao$(eval $(call add_define,MTK_VOLTAGE_BIN_VCORE_SUPPORT))
5845d50759SJames Liaoendif
5945d50759SJames Liao
6045d50759SJames Liaoifeq ($(MT_SPM_RGU_SUPPORT),n)
6145d50759SJames Liao$(eval $(call add_define,MTK_PLAT_SPM_RGU_UNSUPPORT))
6245d50759SJames Liaoendif
6345d50759SJames Liao
6445d50759SJames Liao$(eval $(call MAKE_MODULE,$(MODULE),$(LOCAL_SRCS-y),$(MTK_BL)))
65