blob: 1615cf9534c2b41f4ff47d981cdd63c059a0cf8d [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/ \
developer012c3642021-03-23 15:33:13 +080011 -I${MTK_PLAT}/common/drivers/uart/ \
developer88837432019-05-02 22:01:39 +080012 -I${MTK_PLAT_SOC}/drivers/ \
developer644ec1c2019-08-23 15:50:58 +080013 -I${MTK_PLAT_SOC}/drivers/emi_mpu/ \
developer0d2cfca2019-08-23 10:23:34 +080014 -I${MTK_PLAT_SOC}/drivers/devapc/ \
developer555ed552019-08-21 22:49:49 +080015 -I${MTK_PLAT_SOC}/drivers/mcdi/ \
developera21d47e2019-05-02 19:29:25 +080016 -I${MTK_PLAT_SOC}/drivers/spmc/ \
developerb7ba14b2019-05-02 20:24:50 +080017 -I${MTK_PLAT_SOC}/drivers/gpio/ \
developer345a6e52020-10-12 16:33:25 +080018 -I${MTK_PLAT_SOC}/drivers/timer/ \
developer6f37fd22019-05-02 20:02:05 +080019 -I${MTK_PLAT_SOC}/drivers/pmic/ \
developer083fa242019-08-21 20:50:20 +080020 -I${MTK_PLAT_SOC}/drivers/spm/ \
developerda573122019-08-21 21:17:49 +080021 -I${MTK_PLAT_SOC}/drivers/sspm/ \
developer6f37fd22019-05-02 20:02:05 +080022 -I${MTK_PLAT_SOC}/drivers/rtc/ \
developer1033ea12019-04-10 21:09:26 +080023 -I${MTK_PLAT_SOC}/include/
24
25PLAT_BL_COMMON_SOURCES := lib/xlat_tables/aarch64/xlat_tables.c \
26 lib/xlat_tables/xlat_tables_common.c \
developer1033ea12019-04-10 21:09:26 +080027 plat/common/plat_psci_common.c \
28 plat/common/aarch64/crash_console_helpers.S
29
Alexei Fedorov84f1b5d2020-03-23 18:45:17 +000030# Include GICv3 driver files
31include drivers/arm/gic/v3/gicv3.mk
32
Julius Werner1f363212019-05-30 17:34:08 -070033BL31_SOURCES += common/desc_image_load.c \
34 drivers/arm/cci/cci.c \
Alexei Fedorov84f1b5d2020-03-23 18:45:17 +000035 ${GICV3_SOURCES} \
developer1033ea12019-04-10 21:09:26 +080036 drivers/delay_timer/delay_timer.c \
37 drivers/delay_timer/generic_delay_timer.c \
38 drivers/gpio/gpio.c \
39 drivers/ti/uart/aarch64/16550_console.S \
developer092c53a2019-05-03 16:59:07 +080040 lib/bl_aux_params/bl_aux_params.c \
developer1033ea12019-04-10 21:09:26 +080041 lib/cpus/aarch64/aem_generic.S \
42 lib/cpus/aarch64/cortex_a53.S \
43 lib/cpus/aarch64/cortex_a73.S \
developer3f3f1ab2019-05-02 22:26:22 +080044 plat/common/plat_gicv3.c \
developer1033ea12019-04-10 21:09:26 +080045 ${MTK_PLAT}/common/mtk_plat_common.c \
developer6f37fd22019-05-02 20:02:05 +080046 ${MTK_PLAT}/common/drivers/pmic_wrap/pmic_wrap_init.c \
47 ${MTK_PLAT}/common/drivers/rtc/rtc_common.c \
developer0df1c3c2020-08-01 16:23:12 +080048 ${MTK_PLAT}/common/drivers/uart/uart.c \
developer092c53a2019-05-03 16:59:07 +080049 ${MTK_PLAT}/common/params_setup.c \
developer1033ea12019-04-10 21:09:26 +080050 ${MTK_PLAT_SOC}/aarch64/plat_helpers.S \
51 ${MTK_PLAT_SOC}/aarch64/platform_common.c \
developer0d2cfca2019-08-23 10:23:34 +080052 ${MTK_PLAT_SOC}/drivers/devapc/devapc.c \
developer88837432019-05-02 22:01:39 +080053 ${MTK_PLAT_SOC}/drivers/mcsi/mcsi.c \
developer6f37fd22019-05-02 20:02:05 +080054 ${MTK_PLAT_SOC}/drivers/pmic/pmic.c \
55 ${MTK_PLAT_SOC}/drivers/rtc/rtc.c \
developer555ed552019-08-21 22:49:49 +080056 ${MTK_PLAT_SOC}/drivers/mcdi/mtk_mcdi.c \
developera21d47e2019-05-02 19:29:25 +080057 ${MTK_PLAT_SOC}/drivers/spmc/mtspmc.c \
developer083fa242019-08-21 20:50:20 +080058 ${MTK_PLAT_SOC}/drivers/spm/spm.c \
59 ${MTK_PLAT_SOC}/drivers/spm/spm_pmic_wrap.c \
60 ${MTK_PLAT_SOC}/drivers/spm/spm_suspend.c \
developerb7ba14b2019-05-02 20:24:50 +080061 ${MTK_PLAT_SOC}/drivers/gpio/mtgpio.c \
developer345a6e52020-10-12 16:33:25 +080062 ${MTK_PLAT_SOC}/drivers/timer/mt_timer.c \
developer644ec1c2019-08-23 15:50:58 +080063 ${MTK_PLAT_SOC}/drivers/emi_mpu/emi_mpu.c \
developer1033ea12019-04-10 21:09:26 +080064 ${MTK_PLAT_SOC}/plat_pm.c \
65 ${MTK_PLAT_SOC}/plat_topology.c \
developer3f3f1ab2019-05-02 22:26:22 +080066 ${MTK_PLAT_SOC}/plat_mt_gic.c \
developera21d47e2019-05-02 19:29:25 +080067 ${MTK_PLAT_SOC}/plat_dcm.c \
developer1033ea12019-04-10 21:09:26 +080068 ${MTK_PLAT_SOC}/bl31_plat_setup.c \
69 ${MTK_PLAT_SOC}/plat_debug.c \
developerda573122019-08-21 21:17:49 +080070 ${MTK_PLAT_SOC}/scu.c \
71 ${MTK_PLAT_SOC}/drivers/sspm/sspm.c
developer1033ea12019-04-10 21:09:26 +080072
73# Enable workarounds for selected Cortex-A53 erratas.
74ERRATA_A53_826319 := 0
75ERRATA_A53_836870 := 1
76ERRATA_A53_855873 := 1
77
78# indicate the reset vector address can be programmed
79PROGRAMMABLE_RESET_ADDRESS := 1
80
81COLD_BOOT_SINGLE_CPU := 1
82
83MULTI_CONSOLE_API := 1
84
85MACH_MT8183 := 1
86$(eval $(call add_define,MACH_MT8183))
87
Hung-Te Linc05a0b52019-05-02 21:42:41 +080088include lib/coreboot/coreboot.mk
89