developer | 2189d3a | 2020-04-17 17:14:23 +0800 | [diff] [blame] | 1 | # |
| 2 | # Copyright (c) 2020, 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/ \ |
developer | 404e08b | 2020-09-18 09:32:31 +0800 | [diff] [blame] | 11 | -I${MTK_PLAT_SOC}/include/ \ |
| 12 | -I${MTK_PLAT_SOC}/drivers/ \ |
developer | a630463 | 2020-09-08 14:36:07 +0800 | [diff] [blame] | 13 | -I${MTK_PLAT_SOC}/drivers/dcm \ |
developer | bd48115 | 2020-11-02 10:45:34 +0800 | [diff] [blame] | 14 | -I${MTK_PLAT_SOC}/drivers/emi_mpu/ \ |
developer | 86ada3c | 2020-07-03 09:19:06 +0800 | [diff] [blame] | 15 | -I${MTK_PLAT_SOC}/drivers/gpio/ \ |
developer | a444a20 | 2020-06-15 16:41:03 +0800 | [diff] [blame] | 16 | -I${MTK_PLAT_SOC}/drivers/mcdi/ \ |
developer | 74cf3ec | 2020-08-12 16:31:06 +0800 | [diff] [blame] | 17 | -I${MTK_PLAT_SOC}/drivers/pmic/ \ |
developer | 4d05507 | 2020-08-25 22:31:14 +0800 | [diff] [blame] | 18 | -I${MTK_PLAT_SOC}/drivers/ptp3/ \ |
developer | beab2d7 | 2020-10-14 20:14:37 +0800 | [diff] [blame] | 19 | -I${MTK_PLAT_SOC}/drivers/rtc/ \ |
developer | 31f56a7 | 2020-06-16 13:28:28 +0800 | [diff] [blame] | 20 | -I${MTK_PLAT_SOC}/drivers/spmc/ \ |
developer | 0df1c3c | 2020-08-01 16:23:12 +0800 | [diff] [blame] | 21 | -I${MTK_PLAT_SOC}/drivers/timer/ \ |
| 22 | -I${MTK_PLAT_SOC}/drivers/uart/ |
developer | 2189d3a | 2020-04-17 17:14:23 +0800 | [diff] [blame] | 23 | |
developer | f9b5684 | 2020-06-09 13:38:35 +0800 | [diff] [blame] | 24 | GICV3_SUPPORT_GIC600 := 1 |
developer | 2189d3a | 2020-04-17 17:14:23 +0800 | [diff] [blame] | 25 | include drivers/arm/gic/v3/gicv3.mk |
| 26 | include lib/xlat_tables_v2/xlat_tables.mk |
| 27 | |
| 28 | PLAT_BL_COMMON_SOURCES := ${GICV3_SOURCES} \ |
| 29 | ${XLAT_TABLES_LIB_SRCS} \ |
| 30 | plat/common/aarch64/crash_console_helpers.S \ |
| 31 | plat/common/plat_psci_common.c |
| 32 | |
| 33 | BL31_SOURCES += common/desc_image_load.c \ |
developer | f13d649 | 2020-08-05 13:53:59 +0800 | [diff] [blame] | 34 | drivers/delay_timer/delay_timer.c \ |
| 35 | drivers/delay_timer/generic_delay_timer.c \ |
developer | 2189d3a | 2020-04-17 17:14:23 +0800 | [diff] [blame] | 36 | drivers/ti/uart/aarch64/16550_console.S \ |
developer | 404e08b | 2020-09-18 09:32:31 +0800 | [diff] [blame] | 37 | drivers/gpio/gpio.c \ |
developer | 2189d3a | 2020-04-17 17:14:23 +0800 | [diff] [blame] | 38 | lib/bl_aux_params/bl_aux_params.c \ |
| 39 | lib/cpus/aarch64/cortex_a55.S \ |
| 40 | lib/cpus/aarch64/cortex_a76.S \ |
| 41 | plat/common/plat_gicv3.c \ |
developer | 74cf3ec | 2020-08-12 16:31:06 +0800 | [diff] [blame] | 42 | ${MTK_PLAT}/common/drivers/pmic_wrap/pmic_wrap_init_v2.c \ |
developer | beab2d7 | 2020-10-14 20:14:37 +0800 | [diff] [blame] | 43 | ${MTK_PLAT}/common/drivers/rtc/rtc_common.c \ |
developer | 0df1c3c | 2020-08-01 16:23:12 +0800 | [diff] [blame] | 44 | ${MTK_PLAT}/common/drivers/uart/uart.c \ |
developer | 2189d3a | 2020-04-17 17:14:23 +0800 | [diff] [blame] | 45 | ${MTK_PLAT}/common/mtk_plat_common.c \ |
developer | a84a44a | 2020-08-19 17:20:15 +0800 | [diff] [blame] | 46 | ${MTK_PLAT}/common/mtk_sip_svc.c \ |
developer | 2189d3a | 2020-04-17 17:14:23 +0800 | [diff] [blame] | 47 | ${MTK_PLAT}/common/params_setup.c \ |
| 48 | ${MTK_PLAT_SOC}/aarch64/platform_common.c \ |
| 49 | ${MTK_PLAT_SOC}/aarch64/plat_helpers.S \ |
| 50 | ${MTK_PLAT_SOC}/bl31_plat_setup.c \ |
developer | 74cf3ec | 2020-08-12 16:31:06 +0800 | [diff] [blame] | 51 | ${MTK_PLAT_SOC}/drivers/pmic/pmic.c \ |
developer | beab2d7 | 2020-10-14 20:14:37 +0800 | [diff] [blame] | 52 | ${MTK_PLAT_SOC}/drivers/rtc/rtc.c \ |
developer | 2189d3a | 2020-04-17 17:14:23 +0800 | [diff] [blame] | 53 | ${MTK_PLAT_SOC}/plat_pm.c \ |
developer | f9b5684 | 2020-06-09 13:38:35 +0800 | [diff] [blame] | 54 | ${MTK_PLAT_SOC}/plat_topology.c \ |
developer | 404e08b | 2020-09-18 09:32:31 +0800 | [diff] [blame] | 55 | ${MTK_PLAT_SOC}/plat_mt_gic.c \ |
developer | 28d7038 | 2019-12-19 15:58:20 +0800 | [diff] [blame] | 56 | ${MTK_PLAT_SOC}/plat_mt_cirq.c \ |
developer | a84a44a | 2020-08-19 17:20:15 +0800 | [diff] [blame] | 57 | ${MTK_PLAT_SOC}/plat_sip_calls.c \ |
developer | a630463 | 2020-09-08 14:36:07 +0800 | [diff] [blame] | 58 | ${MTK_PLAT_SOC}/drivers/dcm/mtk_dcm.c \ |
| 59 | ${MTK_PLAT_SOC}/drivers/dcm/mtk_dcm_utils.c \ |
developer | bd48115 | 2020-11-02 10:45:34 +0800 | [diff] [blame] | 60 | ${MTK_PLAT_SOC}/drivers/emi_mpu/emi_mpu.c \ |
developer | 86ada3c | 2020-07-03 09:19:06 +0800 | [diff] [blame] | 61 | ${MTK_PLAT_SOC}/drivers/gpio/mtgpio.c \ |
developer | a444a20 | 2020-06-15 16:41:03 +0800 | [diff] [blame] | 62 | ${MTK_PLAT_SOC}/drivers/mcdi/mt_cpu_pm.c \ |
| 63 | ${MTK_PLAT_SOC}/drivers/mcdi/mt_cpu_pm_cpc.c \ |
| 64 | ${MTK_PLAT_SOC}/drivers/mcdi/mt_mcdi.c \ |
developer | 4d05507 | 2020-08-25 22:31:14 +0800 | [diff] [blame] | 65 | ${MTK_PLAT_SOC}/drivers/ptp3/mtk_ptp3_main.c \ |
developer | 31f56a7 | 2020-06-16 13:28:28 +0800 | [diff] [blame] | 66 | ${MTK_PLAT_SOC}/drivers/spmc/mtspmc.c \ |
developer | 86ada3c | 2020-07-03 09:19:06 +0800 | [diff] [blame] | 67 | ${MTK_PLAT_SOC}/drivers/timer/mt_timer.c |
developer | 2189d3a | 2020-04-17 17:14:23 +0800 | [diff] [blame] | 68 | |
developer | 2189d3a | 2020-04-17 17:14:23 +0800 | [diff] [blame] | 69 | # Configs for A76 and A55 |
| 70 | HW_ASSISTED_COHERENCY := 1 |
| 71 | USE_COHERENT_MEM := 0 |
| 72 | CTX_INCLUDE_AARCH32_REGS := 0 |
| 73 | |
| 74 | # indicate the reset vector address can be programmed |
| 75 | PROGRAMMABLE_RESET_ADDRESS := 1 |
| 76 | |
| 77 | COLD_BOOT_SINGLE_CPU := 1 |
| 78 | |
| 79 | MACH_MT8192 := 1 |
| 80 | $(eval $(call add_define,MACH_MT8192)) |
| 81 | |
| 82 | include lib/coreboot/coreboot.mk |
| 83 | |