platform.mk 4.68 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
#
# Copyright (c) 2020, MediaTek Inc. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#

MTK_PLAT      := plat/mediatek
MTK_PLAT_SOC  := ${MTK_PLAT}/${PLAT}

PLAT_INCLUDES := -I${MTK_PLAT}/common/                            \
Roger Lu's avatar
Roger Lu committed
11
                 -I${MTK_PLAT}/common/lpm/                        \
12
13
                 -I${MTK_PLAT_SOC}/include/                       \
                 -I${MTK_PLAT_SOC}/drivers/                       \
14
                 -I${MTK_PLAT_SOC}/drivers/dcm                    \
15
                 -I${MTK_PLAT_SOC}/drivers/devapc                 \
Xi Chen's avatar
Xi Chen committed
16
                 -I${MTK_PLAT_SOC}/drivers/emi_mpu/               \
17
                 -I${MTK_PLAT_SOC}/drivers/gpio/                  \
18
                 -I${MTK_PLAT_SOC}/drivers/mcdi/                  \
19
                 -I${MTK_PLAT_SOC}/drivers/pmic/                  \
20
                 -I${MTK_PLAT_SOC}/drivers/ptp3/                  \
21
                 -I${MTK_PLAT_SOC}/drivers/rtc/                   \
James Liao's avatar
James Liao committed
22
                 -I${MTK_PLAT_SOC}/drivers/spmc/                  \
23
24
                 -I${MTK_PLAT_SOC}/drivers/timer/                 \
                 -I${MTK_PLAT_SOC}/drivers/uart/
25

26
GICV3_SUPPORT_GIC600        :=      1
27
28
29
30
31
32
33
34
35
include drivers/arm/gic/v3/gicv3.mk
include lib/xlat_tables_v2/xlat_tables.mk

PLAT_BL_COMMON_SOURCES := ${GICV3_SOURCES}                              \
                          ${XLAT_TABLES_LIB_SRCS}                       \
                          plat/common/aarch64/crash_console_helpers.S   \
                          plat/common/plat_psci_common.c

BL31_SOURCES    += common/desc_image_load.c                              \
36
37
                   drivers/delay_timer/delay_timer.c                     \
                   drivers/delay_timer/generic_delay_timer.c             \
38
                   drivers/ti/uart/aarch64/16550_console.S               \
39
                   drivers/gpio/gpio.c                                   \
40
41
42
43
                   lib/bl_aux_params/bl_aux_params.c                     \
                   lib/cpus/aarch64/cortex_a55.S                         \
                   lib/cpus/aarch64/cortex_a76.S                         \
                   plat/common/plat_gicv3.c                              \
44
                   ${MTK_PLAT}/common/drivers/pmic_wrap/pmic_wrap_init_v2.c \
45
                   ${MTK_PLAT}/common/drivers/rtc/rtc_common.c           \
46
                   ${MTK_PLAT}/common/drivers/uart/uart.c                \
Roger Lu's avatar
Roger Lu committed
47
                   ${MTK_PLAT}/common/lpm/mt_lp_rm.c                     \
48
                   ${MTK_PLAT}/common/mtk_plat_common.c                  \
Nina Wu's avatar
Nina Wu committed
49
                   ${MTK_PLAT}/common/mtk_sip_svc.c                      \
50
51
52
53
                   ${MTK_PLAT}/common/params_setup.c                     \
                   ${MTK_PLAT_SOC}/aarch64/platform_common.c             \
                   ${MTK_PLAT_SOC}/aarch64/plat_helpers.S                \
                   ${MTK_PLAT_SOC}/bl31_plat_setup.c                     \
54
                   ${MTK_PLAT_SOC}/drivers/pmic/pmic.c                   \
55
                   ${MTK_PLAT_SOC}/drivers/rtc/rtc.c                     \
56
                   ${MTK_PLAT_SOC}/plat_pm.c                             \
57
                   ${MTK_PLAT_SOC}/plat_topology.c                       \
58
                   ${MTK_PLAT_SOC}/plat_mt_gic.c                         \
59
                   ${MTK_PLAT_SOC}/plat_mt_cirq.c                        \
Nina Wu's avatar
Nina Wu committed
60
                   ${MTK_PLAT_SOC}/plat_sip_calls.c                      \
61
62
                   ${MTK_PLAT_SOC}/drivers/dcm/mtk_dcm.c                 \
                   ${MTK_PLAT_SOC}/drivers/dcm/mtk_dcm_utils.c           \
63
                   ${MTK_PLAT_SOC}/drivers/devapc/devapc.c               \
Xi Chen's avatar
Xi Chen committed
64
                   ${MTK_PLAT_SOC}/drivers/emi_mpu/emi_mpu.c             \
65
                   ${MTK_PLAT_SOC}/drivers/gpio/mtgpio.c                 \
66
67
                   ${MTK_PLAT_SOC}/drivers/mcdi/mt_cpu_pm.c              \
                   ${MTK_PLAT_SOC}/drivers/mcdi/mt_cpu_pm_cpc.c          \
68
                   ${MTK_PLAT_SOC}/drivers/mcdi/mt_lp_irqremain.c        \
69
                   ${MTK_PLAT_SOC}/drivers/mcdi/mt_mcdi.c                \
70
                   ${MTK_PLAT_SOC}/drivers/ptp3/mtk_ptp3_main.c          \
James Liao's avatar
James Liao committed
71
                   ${MTK_PLAT_SOC}/drivers/spmc/mtspmc.c                 \
72
                   ${MTK_PLAT_SOC}/drivers/timer/mt_timer.c
73

74
75
76
# Build SPM drivers
include ${MTK_PLAT_SOC}/drivers/spm/build.mk

77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Configs for A76 and A55
HW_ASSISTED_COHERENCY := 1
USE_COHERENT_MEM := 0
CTX_INCLUDE_AARCH32_REGS := 0

# indicate the reset vector address can be programmed
PROGRAMMABLE_RESET_ADDRESS := 1

COLD_BOOT_SINGLE_CPU := 1

MACH_MT8192 := 1
$(eval $(call add_define,MACH_MT8192))

include lib/coreboot/coreboot.mk