developer | 8670d25 | 2021-03-19 22:13:11 +0800 | [diff] [blame] | 1 | # |
| 2 | # Copyright (c) 2021, MediaTek Inc. All rights reserved. |
| 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/ \ |
christine.zhu | a22c10b | 2021-03-24 21:44:52 +0800 | [diff] [blame] | 11 | -I${MTK_PLAT}/common/drivers/gic600/ \ |
developer | 912c7d2 | 2021-03-31 14:53:43 +0800 | [diff] [blame] | 12 | -I${MTK_PLAT}/common/drivers/gpio/ \ |
developer | 0e72637 | 2021-04-08 19:07:49 +0800 | [diff] [blame] | 13 | -I${MTK_PLAT}/common/drivers/rtc/ \ |
developer | 4c1354b | 2021-04-22 14:56:58 +0800 | [diff] [blame] | 14 | -I${MTK_PLAT}/common/drivers/timer/ \ |
developer | 912c7d2 | 2021-03-31 14:53:43 +0800 | [diff] [blame] | 15 | -I${MTK_PLAT_SOC}/drivers/gpio/ \ |
developer | 037c99f | 2020-06-15 16:41:03 +0800 | [diff] [blame] | 16 | -I${MTK_PLAT_SOC}/drivers/mcdi/ \ |
developer | ddb7f40 | 2021-04-08 16:37:15 +0800 | [diff] [blame] | 17 | -I${MTK_PLAT_SOC}/drivers/pmic/ \ |
developer | 2a56b2c | 2020-06-16 13:28:28 +0800 | [diff] [blame] | 18 | -I${MTK_PLAT_SOC}/drivers/spmc/ \ |
developer | 8670d25 | 2021-03-19 22:13:11 +0800 | [diff] [blame] | 19 | -I${MTK_PLAT_SOC}/include/ |
| 20 | |
christine.zhu | a22c10b | 2021-03-24 21:44:52 +0800 | [diff] [blame] | 21 | GICV3_SUPPORT_GIC600 := 1 |
developer | 8670d25 | 2021-03-19 22:13:11 +0800 | [diff] [blame] | 22 | include drivers/arm/gic/v3/gicv3.mk |
| 23 | include lib/xlat_tables_v2/xlat_tables.mk |
| 24 | |
| 25 | PLAT_BL_COMMON_SOURCES := ${GICV3_SOURCES} \ |
| 26 | ${XLAT_TABLES_LIB_SRCS} \ |
| 27 | plat/common/aarch64/crash_console_helpers.S \ |
| 28 | plat/common/plat_psci_common.c |
| 29 | |
| 30 | |
| 31 | BL31_SOURCES += common/desc_image_load.c \ |
developer | 98b9718 | 2021-03-26 18:33:43 +0800 | [diff] [blame] | 32 | drivers/delay_timer/delay_timer.c \ |
developer | 912c7d2 | 2021-03-31 14:53:43 +0800 | [diff] [blame] | 33 | drivers/gpio/gpio.c \ |
developer | 98b9718 | 2021-03-26 18:33:43 +0800 | [diff] [blame] | 34 | drivers/delay_timer/generic_delay_timer.c \ |
developer | 8670d25 | 2021-03-19 22:13:11 +0800 | [diff] [blame] | 35 | drivers/ti/uart/aarch64/16550_console.S \ |
| 36 | lib/bl_aux_params/bl_aux_params.c \ |
| 37 | lib/cpus/aarch64/cortex_a55.S \ |
| 38 | lib/cpus/aarch64/cortex_a78.S \ |
| 39 | plat/common/plat_gicv3.c \ |
christine.zhu | a22c10b | 2021-03-24 21:44:52 +0800 | [diff] [blame] | 40 | ${MTK_PLAT}/common/drivers/gic600/mt_gic_v3.c \ |
developer | 912c7d2 | 2021-03-31 14:53:43 +0800 | [diff] [blame] | 41 | ${MTK_PLAT}/common/drivers/gpio/mtgpio_common.c \ |
developer | ddb7f40 | 2021-04-08 16:37:15 +0800 | [diff] [blame] | 42 | ${MTK_PLAT}/common/drivers/pmic_wrap/pmic_wrap_init_v2.c \ |
developer | 0e72637 | 2021-04-08 19:07:49 +0800 | [diff] [blame] | 43 | ${MTK_PLAT}/common/drivers/rtc/rtc_common.c \ |
| 44 | ${MTK_PLAT}/common/drivers/rtc/rtc_mt6359p.c \ |
developer | 4c1354b | 2021-04-22 14:56:58 +0800 | [diff] [blame] | 45 | ${MTK_PLAT}/common/drivers/timer/mt_timer.c \ |
developer | 8273a60 | 2021-03-25 11:26:46 +0800 | [diff] [blame] | 46 | ${MTK_PLAT}/common/mtk_cirq.c \ |
developer | 8670d25 | 2021-03-19 22:13:11 +0800 | [diff] [blame] | 47 | ${MTK_PLAT}/common/mtk_plat_common.c \ |
developer | c0c0782 | 2021-03-29 16:50:30 +0800 | [diff] [blame] | 48 | ${MTK_PLAT}/common/mtk_sip_svc.c \ |
developer | 8670d25 | 2021-03-19 22:13:11 +0800 | [diff] [blame] | 49 | ${MTK_PLAT}/common/params_setup.c \ |
| 50 | ${MTK_PLAT_SOC}/aarch64/platform_common.c \ |
| 51 | ${MTK_PLAT_SOC}/aarch64/plat_helpers.S \ |
| 52 | ${MTK_PLAT_SOC}/bl31_plat_setup.c \ |
developer | 912c7d2 | 2021-03-31 14:53:43 +0800 | [diff] [blame] | 53 | ${MTK_PLAT_SOC}/drivers/gpio/mtgpio.c \ |
developer | 037c99f | 2020-06-15 16:41:03 +0800 | [diff] [blame] | 54 | ${MTK_PLAT_SOC}/drivers/mcdi/mt_cpu_pm.c \ |
| 55 | ${MTK_PLAT_SOC}/drivers/mcdi/mt_cpu_pm_cpc.c \ |
| 56 | ${MTK_PLAT_SOC}/drivers/mcdi/mt_mcdi.c \ |
developer | 912c7d2 | 2021-03-31 14:53:43 +0800 | [diff] [blame] | 57 | ${MTK_PLAT_SOC}/drivers/gpio/mtgpio.c \ |
developer | ddb7f40 | 2021-04-08 16:37:15 +0800 | [diff] [blame] | 58 | ${MTK_PLAT_SOC}/drivers/pmic/pmic.c \ |
developer | 2a56b2c | 2020-06-16 13:28:28 +0800 | [diff] [blame] | 59 | ${MTK_PLAT_SOC}/drivers/spmc/mtspmc.c \ |
developer | 8670d25 | 2021-03-19 22:13:11 +0800 | [diff] [blame] | 60 | ${MTK_PLAT_SOC}/plat_pm.c \ |
developer | c0c0782 | 2021-03-29 16:50:30 +0800 | [diff] [blame] | 61 | ${MTK_PLAT_SOC}/plat_sip_calls.c \ |
developer | 8670d25 | 2021-03-19 22:13:11 +0800 | [diff] [blame] | 62 | ${MTK_PLAT_SOC}/plat_topology.c |
| 63 | |
| 64 | # Configs for A78 and A55 |
| 65 | HW_ASSISTED_COHERENCY := 1 |
| 66 | USE_COHERENT_MEM := 0 |
| 67 | CTX_INCLUDE_AARCH32_REGS := 0 |
| 68 | ERRATA_A55_1530923 := 1 |
| 69 | |
| 70 | # indicate the reset vector address can be programmed |
| 71 | PROGRAMMABLE_RESET_ADDRESS := 1 |
| 72 | |
| 73 | COLD_BOOT_SINGLE_CPU := 1 |
| 74 | |
| 75 | MACH_MT8195 := 1 |
| 76 | $(eval $(call add_define,MACH_MT8195)) |
| 77 | |
| 78 | include lib/coreboot/coreboot.mk |