blob: 59ffe5dc028caa02300ce2fd614acf1887c86bab [file] [log] [blame]
developer1033ea12019-04-10 21:09:26 +08001#
developera21d47e2019-05-02 19:29:25 +08002# Copyright (c) 2019, MediaTek Inc. All rights reserved.
developer1033ea12019-04-10 21:09:26 +08003#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7MTK_PLAT := plat/mediatek
8MTK_PLAT_SOC := ${MTK_PLAT}/${PLAT}
9
10PLAT_INCLUDES := -I${MTK_PLAT}/common/ \
developer88837432019-05-02 22:01:39 +080011 -I${MTK_PLAT_SOC}/drivers/ \
developer644ec1c2019-08-23 15:50:58 +080012 -I${MTK_PLAT_SOC}/drivers/emi_mpu/ \
developer0d2cfca2019-08-23 10:23:34 +080013 -I${MTK_PLAT_SOC}/drivers/devapc/ \
developer555ed552019-08-21 22:49:49 +080014 -I${MTK_PLAT_SOC}/drivers/mcdi/ \
developera21d47e2019-05-02 19:29:25 +080015 -I${MTK_PLAT_SOC}/drivers/spmc/ \
developerb7ba14b2019-05-02 20:24:50 +080016 -I${MTK_PLAT_SOC}/drivers/gpio/ \
developer6f37fd22019-05-02 20:02:05 +080017 -I${MTK_PLAT_SOC}/drivers/pmic/ \
developer083fa242019-08-21 20:50:20 +080018 -I${MTK_PLAT_SOC}/drivers/spm/ \
developerda573122019-08-21 21:17:49 +080019 -I${MTK_PLAT_SOC}/drivers/sspm/ \
developer6f37fd22019-05-02 20:02:05 +080020 -I${MTK_PLAT_SOC}/drivers/rtc/ \
developera767ecc2019-08-20 22:27:44 +080021 -I${MTK_PLAT_SOC}/drivers/uart/ \
developer1033ea12019-04-10 21:09:26 +080022 -I${MTK_PLAT_SOC}/include/
23
24PLAT_BL_COMMON_SOURCES := lib/xlat_tables/aarch64/xlat_tables.c \
25 lib/xlat_tables/xlat_tables_common.c \
developer1033ea12019-04-10 21:09:26 +080026 plat/common/plat_psci_common.c \
27 plat/common/aarch64/crash_console_helpers.S
28
Julius Werner1f363212019-05-30 17:34:08 -070029BL31_SOURCES += common/desc_image_load.c \
30 drivers/arm/cci/cci.c \
developer1033ea12019-04-10 21:09:26 +080031 drivers/arm/gic/common/gic_common.c \
developer3f3f1ab2019-05-02 22:26:22 +080032 drivers/arm/gic/v3/arm_gicv3_common.c \
33 drivers/arm/gic/v3/gicv3_helpers.c \
Alexei Fedorov2f13d6c2020-02-21 10:17:26 +000034 drivers/arm/gic/v3/gicdv3_helpers.c \
35 drivers/arm/gic/v3/gicrv3_helpers.c \
developer3f3f1ab2019-05-02 22:26:22 +080036 drivers/arm/gic/v3/gic500.c \
37 drivers/arm/gic/v3/gicv3_main.c \
developer1033ea12019-04-10 21:09:26 +080038 drivers/delay_timer/delay_timer.c \
39 drivers/delay_timer/generic_delay_timer.c \
40 drivers/gpio/gpio.c \
41 drivers/ti/uart/aarch64/16550_console.S \
developer092c53a2019-05-03 16:59:07 +080042 lib/bl_aux_params/bl_aux_params.c \
developer1033ea12019-04-10 21:09:26 +080043 lib/cpus/aarch64/aem_generic.S \
44 lib/cpus/aarch64/cortex_a53.S \
45 lib/cpus/aarch64/cortex_a73.S \
developer3f3f1ab2019-05-02 22:26:22 +080046 plat/common/plat_gicv3.c \
developer1033ea12019-04-10 21:09:26 +080047 ${MTK_PLAT}/common/mtk_plat_common.c \
developer6f37fd22019-05-02 20:02:05 +080048 ${MTK_PLAT}/common/drivers/pmic_wrap/pmic_wrap_init.c \
49 ${MTK_PLAT}/common/drivers/rtc/rtc_common.c \
developer092c53a2019-05-03 16:59:07 +080050 ${MTK_PLAT}/common/params_setup.c \
developer1033ea12019-04-10 21:09:26 +080051 ${MTK_PLAT_SOC}/aarch64/plat_helpers.S \
52 ${MTK_PLAT_SOC}/aarch64/platform_common.c \
developer0d2cfca2019-08-23 10:23:34 +080053 ${MTK_PLAT_SOC}/drivers/devapc/devapc.c \
developer88837432019-05-02 22:01:39 +080054 ${MTK_PLAT_SOC}/drivers/mcsi/mcsi.c \
developer6f37fd22019-05-02 20:02:05 +080055 ${MTK_PLAT_SOC}/drivers/pmic/pmic.c \
56 ${MTK_PLAT_SOC}/drivers/rtc/rtc.c \
developer555ed552019-08-21 22:49:49 +080057 ${MTK_PLAT_SOC}/drivers/mcdi/mtk_mcdi.c \
developera21d47e2019-05-02 19:29:25 +080058 ${MTK_PLAT_SOC}/drivers/spmc/mtspmc.c \
developer083fa242019-08-21 20:50:20 +080059 ${MTK_PLAT_SOC}/drivers/spm/spm.c \
60 ${MTK_PLAT_SOC}/drivers/spm/spm_pmic_wrap.c \
61 ${MTK_PLAT_SOC}/drivers/spm/spm_suspend.c \
developerb7ba14b2019-05-02 20:24:50 +080062 ${MTK_PLAT_SOC}/drivers/gpio/mtgpio.c \
developera767ecc2019-08-20 22:27:44 +080063 ${MTK_PLAT_SOC}/drivers/uart/uart.c \
developer644ec1c2019-08-23 15:50:58 +080064 ${MTK_PLAT_SOC}/drivers/emi_mpu/emi_mpu.c \
developer1033ea12019-04-10 21:09:26 +080065 ${MTK_PLAT_SOC}/plat_pm.c \
66 ${MTK_PLAT_SOC}/plat_topology.c \
developer3f3f1ab2019-05-02 22:26:22 +080067 ${MTK_PLAT_SOC}/plat_mt_gic.c \
developera21d47e2019-05-02 19:29:25 +080068 ${MTK_PLAT_SOC}/plat_dcm.c \
developer1033ea12019-04-10 21:09:26 +080069 ${MTK_PLAT_SOC}/bl31_plat_setup.c \
70 ${MTK_PLAT_SOC}/plat_debug.c \
developerda573122019-08-21 21:17:49 +080071 ${MTK_PLAT_SOC}/scu.c \
72 ${MTK_PLAT_SOC}/drivers/sspm/sspm.c
developer1033ea12019-04-10 21:09:26 +080073
74# Enable workarounds for selected Cortex-A53 erratas.
75ERRATA_A53_826319 := 0
76ERRATA_A53_836870 := 1
77ERRATA_A53_855873 := 1
78
79# indicate the reset vector address can be programmed
80PROGRAMMABLE_RESET_ADDRESS := 1
81
82COLD_BOOT_SINGLE_CPU := 1
83
84MULTI_CONSOLE_API := 1
85
86MACH_MT8183 := 1
87$(eval $(call add_define,MACH_MT8183))
88
Hung-Te Linc05a0b52019-05-02 21:42:41 +080089include lib/coreboot/coreboot.mk
90