developer | 1033ea1 | 2019-04-10 21:09:26 +0800 | [diff] [blame] | 1 | # |
developer | 8c327e8 | 2022-05-29 22:25:44 +0800 | [diff] [blame] | 2 | # Copyright (c) 2019-2022, MediaTek Inc. All rights reserved. |
developer | 1033ea1 | 2019-04-10 21:09:26 +0800 | [diff] [blame] | 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | |
| 7 | MTK_PLAT := plat/mediatek |
| 8 | MTK_PLAT_SOC := ${MTK_PLAT}/${PLAT} |
| 9 | |
| 10 | PLAT_INCLUDES := -I${MTK_PLAT}/common/ \ |
developer | fe14b9f | 2022-09-05 11:18:04 +0800 | [diff] [blame] | 11 | -I${MTK_PLAT}/drivers/uart/ \ |
developer | 8c327e8 | 2022-05-29 22:25:44 +0800 | [diff] [blame] | 12 | -I${MTK_PLAT}/include/ \ |
developer | 8883743 | 2019-05-02 22:01:39 +0800 | [diff] [blame] | 13 | -I${MTK_PLAT_SOC}/drivers/ \ |
developer | 644ec1c | 2019-08-23 15:50:58 +0800 | [diff] [blame] | 14 | -I${MTK_PLAT_SOC}/drivers/emi_mpu/ \ |
developer | 0d2cfca | 2019-08-23 10:23:34 +0800 | [diff] [blame] | 15 | -I${MTK_PLAT_SOC}/drivers/devapc/ \ |
developer | 555ed55 | 2019-08-21 22:49:49 +0800 | [diff] [blame] | 16 | -I${MTK_PLAT_SOC}/drivers/mcdi/ \ |
developer | a21d47e | 2019-05-02 19:29:25 +0800 | [diff] [blame] | 17 | -I${MTK_PLAT_SOC}/drivers/spmc/ \ |
developer | b7ba14b | 2019-05-02 20:24:50 +0800 | [diff] [blame] | 18 | -I${MTK_PLAT_SOC}/drivers/gpio/ \ |
developer | 345a6e5 | 2020-10-12 16:33:25 +0800 | [diff] [blame] | 19 | -I${MTK_PLAT_SOC}/drivers/timer/ \ |
developer | 6f37fd2 | 2019-05-02 20:02:05 +0800 | [diff] [blame] | 20 | -I${MTK_PLAT_SOC}/drivers/pmic/ \ |
developer | 083fa24 | 2019-08-21 20:50:20 +0800 | [diff] [blame] | 21 | -I${MTK_PLAT_SOC}/drivers/spm/ \ |
developer | da57312 | 2019-08-21 21:17:49 +0800 | [diff] [blame] | 22 | -I${MTK_PLAT_SOC}/drivers/sspm/ \ |
developer | 6f37fd2 | 2019-05-02 20:02:05 +0800 | [diff] [blame] | 23 | -I${MTK_PLAT_SOC}/drivers/rtc/ \ |
developer | 1033ea1 | 2019-04-10 21:09:26 +0800 | [diff] [blame] | 24 | -I${MTK_PLAT_SOC}/include/ |
| 25 | |
| 26 | PLAT_BL_COMMON_SOURCES := lib/xlat_tables/aarch64/xlat_tables.c \ |
| 27 | lib/xlat_tables/xlat_tables_common.c \ |
developer | 1033ea1 | 2019-04-10 21:09:26 +0800 | [diff] [blame] | 28 | plat/common/plat_psci_common.c \ |
| 29 | plat/common/aarch64/crash_console_helpers.S |
| 30 | |
Alexei Fedorov | 84f1b5d | 2020-03-23 18:45:17 +0000 | [diff] [blame] | 31 | # Include GICv3 driver files |
| 32 | include drivers/arm/gic/v3/gicv3.mk |
| 33 | |
Julius Werner | 1f36321 | 2019-05-30 17:34:08 -0700 | [diff] [blame] | 34 | BL31_SOURCES += common/desc_image_load.c \ |
| 35 | drivers/arm/cci/cci.c \ |
Alexei Fedorov | 84f1b5d | 2020-03-23 18:45:17 +0000 | [diff] [blame] | 36 | ${GICV3_SOURCES} \ |
developer | 1033ea1 | 2019-04-10 21:09:26 +0800 | [diff] [blame] | 37 | drivers/delay_timer/delay_timer.c \ |
| 38 | drivers/delay_timer/generic_delay_timer.c \ |
| 39 | drivers/gpio/gpio.c \ |
| 40 | drivers/ti/uart/aarch64/16550_console.S \ |
developer | 092c53a | 2019-05-03 16:59:07 +0800 | [diff] [blame] | 41 | lib/bl_aux_params/bl_aux_params.c \ |
developer | 1033ea1 | 2019-04-10 21:09:26 +0800 | [diff] [blame] | 42 | lib/cpus/aarch64/aem_generic.S \ |
| 43 | lib/cpus/aarch64/cortex_a53.S \ |
| 44 | lib/cpus/aarch64/cortex_a73.S \ |
developer | 3f3f1ab | 2019-05-02 22:26:22 +0800 | [diff] [blame] | 45 | plat/common/plat_gicv3.c \ |
developer | 1033ea1 | 2019-04-10 21:09:26 +0800 | [diff] [blame] | 46 | ${MTK_PLAT}/common/mtk_plat_common.c \ |
developer | 092c53a | 2019-05-03 16:59:07 +0800 | [diff] [blame] | 47 | ${MTK_PLAT}/common/params_setup.c \ |
developer | fe14b9f | 2022-09-05 11:18:04 +0800 | [diff] [blame] | 48 | ${MTK_PLAT}/drivers/pmic_wrap/pmic_wrap_init.c \ |
| 49 | ${MTK_PLAT}/drivers/rtc/rtc_common.c \ |
| 50 | ${MTK_PLAT}/drivers/uart/uart.c \ |
developer | 1033ea1 | 2019-04-10 21:09:26 +0800 | [diff] [blame] | 51 | ${MTK_PLAT_SOC}/aarch64/plat_helpers.S \ |
| 52 | ${MTK_PLAT_SOC}/aarch64/platform_common.c \ |
developer | 0d2cfca | 2019-08-23 10:23:34 +0800 | [diff] [blame] | 53 | ${MTK_PLAT_SOC}/drivers/devapc/devapc.c \ |
developer | 8883743 | 2019-05-02 22:01:39 +0800 | [diff] [blame] | 54 | ${MTK_PLAT_SOC}/drivers/mcsi/mcsi.c \ |
developer | 6f37fd2 | 2019-05-02 20:02:05 +0800 | [diff] [blame] | 55 | ${MTK_PLAT_SOC}/drivers/pmic/pmic.c \ |
| 56 | ${MTK_PLAT_SOC}/drivers/rtc/rtc.c \ |
developer | 555ed55 | 2019-08-21 22:49:49 +0800 | [diff] [blame] | 57 | ${MTK_PLAT_SOC}/drivers/mcdi/mtk_mcdi.c \ |
developer | a21d47e | 2019-05-02 19:29:25 +0800 | [diff] [blame] | 58 | ${MTK_PLAT_SOC}/drivers/spmc/mtspmc.c \ |
developer | 083fa24 | 2019-08-21 20:50:20 +0800 | [diff] [blame] | 59 | ${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 \ |
developer | b7ba14b | 2019-05-02 20:24:50 +0800 | [diff] [blame] | 62 | ${MTK_PLAT_SOC}/drivers/gpio/mtgpio.c \ |
developer | 345a6e5 | 2020-10-12 16:33:25 +0800 | [diff] [blame] | 63 | ${MTK_PLAT_SOC}/drivers/timer/mt_timer.c \ |
developer | 644ec1c | 2019-08-23 15:50:58 +0800 | [diff] [blame] | 64 | ${MTK_PLAT_SOC}/drivers/emi_mpu/emi_mpu.c \ |
developer | 1033ea1 | 2019-04-10 21:09:26 +0800 | [diff] [blame] | 65 | ${MTK_PLAT_SOC}/plat_pm.c \ |
| 66 | ${MTK_PLAT_SOC}/plat_topology.c \ |
developer | 3f3f1ab | 2019-05-02 22:26:22 +0800 | [diff] [blame] | 67 | ${MTK_PLAT_SOC}/plat_mt_gic.c \ |
developer | a21d47e | 2019-05-02 19:29:25 +0800 | [diff] [blame] | 68 | ${MTK_PLAT_SOC}/plat_dcm.c \ |
developer | 1033ea1 | 2019-04-10 21:09:26 +0800 | [diff] [blame] | 69 | ${MTK_PLAT_SOC}/bl31_plat_setup.c \ |
| 70 | ${MTK_PLAT_SOC}/plat_debug.c \ |
developer | da57312 | 2019-08-21 21:17:49 +0800 | [diff] [blame] | 71 | ${MTK_PLAT_SOC}/scu.c \ |
| 72 | ${MTK_PLAT_SOC}/drivers/sspm/sspm.c |
developer | 1033ea1 | 2019-04-10 21:09:26 +0800 | [diff] [blame] | 73 | |
| 74 | # Enable workarounds for selected Cortex-A53 erratas. |
| 75 | ERRATA_A53_826319 := 0 |
| 76 | ERRATA_A53_836870 := 1 |
| 77 | ERRATA_A53_855873 := 1 |
| 78 | |
| 79 | # indicate the reset vector address can be programmed |
| 80 | PROGRAMMABLE_RESET_ADDRESS := 1 |
| 81 | |
| 82 | COLD_BOOT_SINGLE_CPU := 1 |
| 83 | |
| 84 | MULTI_CONSOLE_API := 1 |
| 85 | |
| 86 | MACH_MT8183 := 1 |
| 87 | $(eval $(call add_define,MACH_MT8183)) |
| 88 | |
Hung-Te Lin | c05a0b5 | 2019-05-02 21:42:41 +0800 | [diff] [blame] | 89 | include lib/coreboot/coreboot.mk |
| 90 | |