| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
LOCAL_DIR := $(call GET_LOCAL_DIR) |
| 8 |
MODULE := spm_${MTK_SOC} |
| 9 |
|
| 10 |
define GET_UPPER_DIR |
| 11 |
$(shell dirname ${LOCAL_DIR}) |
| 12 |
endef |
| 13 |
UPPER_DIR := $(call GET_UPPER_DIR) |
| 14 |
|
| 15 |
MT_SPM_FEATURE_SUPPORT := y |
| 16 |
MT_SPM_CIRQ_FEATURE_SUPPORT := n |
| 17 |
MT_SPMFW_SPM_SRAM_SLEEP_SUPPORT := n |
| 18 |
MT_SPM_SSPM_NOTIFIER_SUPPORT := y |
| 19 |
MT_SPM_UART_SUSPEND_SUPPORT := n |
| 20 |
MT_SPM_RGU_SUPPORT := n |
| 21 |
|
| 22 |
LOCAL_SRCS-y := ${LOCAL_DIR}/mt_spm.c |
| 23 |
LOCAL_SRCS-y += ${LOCAL_DIR}/mt_spm_conservation.c |
| 24 |
LOCAL_SRCS-y += ${LOCAL_DIR}/mt_spm_internal.c |
| 25 |
LOCAL_SRCS-y += ${LOCAL_DIR}/mt_spm_pmic_wrap.c |
| 26 |
LOCAL_SRCS-${MT_SPM_FEATURE_SUPPORT} += ${LOCAL_DIR}/mt_spm_cond.c |
| 27 |
LOCAL_SRCS-${MT_SPM_FEATURE_SUPPORT} += ${LOCAL_DIR}/mt_spm_idle.c |
| 28 |
LOCAL_SRCS-${MT_SPM_FEATURE_SUPPORT} += ${LOCAL_DIR}/mt_spm_suspend.c |
| 29 |
LOCAL_SRCS-${MT_SPM_FEATURE_SUPPORT} += ${LOCAL_DIR}/constraints/mt_spm_rc_api.c |
| 30 |
LOCAL_SRCS-${MT_SPM_FEATURE_SUPPORT} += ${LOCAL_DIR}/constraints/mt_spm_rc_bus26m.c |
| 31 |
LOCAL_SRCS-${MT_SPM_FEATURE_SUPPORT} += ${LOCAL_DIR}/constraints/mt_spm_rc_cpu_buck_ldo.c |
| 32 |
LOCAL_SRCS-${MT_SPM_FEATURE_SUPPORT} += ${LOCAL_DIR}/constraints/mt_spm_rc_dram.c |
| 33 |
LOCAL_SRCS-${MT_SPM_FEATURE_SUPPORT} += ${LOCAL_DIR}/constraints/mt_spm_rc_syspll.c |
| 34 |
LOCAL_SRCS-${MT_SPM_SSPM_NOTIFIER_SUPPORT} += ${UPPER_DIR}/version/notifier/v1/mt_spm_sspm_notifier.c |
| 35 |
|
| 36 |
ifeq (${MT_SPM_FEATURE_SUPPORT},n) |
| 37 |
$(eval $(call add_define,MTK_PLAT_SPM_UNSUPPORT)) |
| 38 |
endif |
| 39 |
|
| 40 |
ifeq (${MT_SPM_CIRQ_FEATURE_SUPPORT},n) |
| 41 |
$(eval $(call add_define,MTK_PLAT_CIRQ_UNSUPPORT)) |
| 42 |
endif |
| 43 |
|
| 44 |
ifeq (${MT_SPMFW_SPM_SRAM_SLEEP_SUPPORT},n) |
| 45 |
$(eval $(call add_define,MTK_PLAT_SPM_SRAM_SLP_UNSUPPORT)) |
| 46 |
endif |
| 47 |
|
| 48 |
ifeq (${MT_SPM_SSPM_NOTIFIER_SUPPORT},n) |
| 49 |
$(eval $(call add_define,MTK_PLAT_SPM_SSPM_NOTIFIER_UNSUPPORT)) |
| 50 |
endif |
| 51 |
|
| 52 |
ifeq (${MT_SPM_UART_SUSPEND_SUPPORT},n) |
| 53 |
$(eval $(call add_define,MTK_PLAT_SPM_UART_UNSUPPORT)) |
| 54 |
endif |
| 55 |
|
| 56 |
ifeq ($(MTK_VOLTAGE_BIN_VCORE),y) |
| 57 |
$(eval $(call add_define,MTK_VOLTAGE_BIN_VCORE_SUPPORT)) |
| 58 |
endif |
| 59 |
|
| 60 |
ifeq ($(MT_SPM_RGU_SUPPORT),n) |
| 61 |
$(eval $(call add_define,MTK_PLAT_SPM_RGU_UNSUPPORT)) |
| 62 |
endif |
| 63 |
|
| 64 |
$(eval $(call MAKE_MODULE,$(MODULE),$(LOCAL_SRCS-y),$(MTK_BL))) |