1#
2# Copyright (c) 2017-2022, ARM Limited and Contributors. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7# We don't use BL1 or BL2, so BL31 is the first image to execute
8RESET_TO_BL31		:=	1
9# Only one core starts up at first
10COLD_BOOT_SINGLE_CPU	:=	1
11# We can choose where a core starts executing
12PROGRAMMABLE_RESET_ADDRESS:=	1
13
14# ARM coherency is managed in hardware
15WARMBOOT_ENABLE_DCACHE_EARLY :=	1
16
17# A53 erratum for SoC. (enable them all)
18ERRATA_A53_826319	:=	1
19ERRATA_A53_835769	:=	1
20ERRATA_A53_836870	:=	1
21ERRATA_A53_843419	:=	1
22ERRATA_A53_855873	:=	1
23ERRATA_A53_1530924	:=	1
24
25# A72 Erratum for SoC
26ERRATA_A72_859971	:=	1
27ERRATA_A72_1319367	:=	1
28
29CRASH_REPORTING		:= 1
30HANDLE_EA_EL3_FIRST_NS	:= 1
31
32# Split out RO data into a non-executable section
33SEPARATE_CODE_AND_RODATA :=    1
34
35# Generate a Position Independent Executable
36ENABLE_PIE		:=	1
37
38TI_16550_MDR_QUIRK	:=	1
39$(eval $(call add_define,TI_16550_MDR_QUIRK))
40
41K3_USART		:=	0
42$(eval $(call add_define,K3_USART))
43
44# Allow customizing the UART baud rate
45K3_USART_BAUD		:=	115200
46$(eval $(call add_define,K3_USART_BAUD))
47
48# Enable system suspend modes
49K3_PM_SYSTEM_SUSPEND	:=	0
50$(eval $(call add_define,K3_PM_SYSTEM_SUSPEND))
51
52# Libraries
53include lib/xlat_tables_v2/xlat_tables.mk
54
55PLAT_INCLUDES		+=	\
56				-I${PLAT_PATH}/include			\
57				-I${PLAT_PATH}/common/drivers/sec_proxy	\
58				-I${PLAT_PATH}/common/drivers/ti_sci	\
59
60K3_CONSOLE_SOURCES	+=	\
61				drivers/ti/uart/aarch64/16550_console.S	\
62				${PLAT_PATH}/common/k3_console.c	\
63
64# Include GICv3 driver files
65include drivers/arm/gic/v3/gicv3.mk
66
67K3_GIC_SOURCES		+=	\
68				${GICV3_SOURCES}			\
69				plat/common/plat_gicv3.c		\
70				${PLAT_PATH}/common/k3_gicv3.c		\
71
72K3_PSCI_SOURCES		+=	\
73				plat/common/plat_psci_common.c		\
74				${PLAT_PATH}/common/k3_psci.c		\
75
76K3_SEC_PROXY_SOURCES	+=	\
77				${PLAT_PATH}/common/drivers/sec_proxy/sec_proxy.c \
78
79K3_TI_SCI_SOURCES	+=	\
80				${PLAT_PATH}/common/drivers/ti_sci/ti_sci.c \
81
82PLAT_BL_COMMON_SOURCES	+=	\
83				lib/cpus/aarch64/cortex_a53.S		\
84				lib/cpus/aarch64/cortex_a72.S		\
85				${XLAT_TABLES_LIB_SRCS}			\
86				${K3_CONSOLE_SOURCES}			\
87
88BL31_SOURCES		+=	\
89				${PLAT_PATH}/common/k3_bl31_setup.c	\
90				${PLAT_PATH}/common/k3_helpers.S	\
91				${PLAT_PATH}/common/k3_topology.c	\
92				${K3_GIC_SOURCES}			\
93				${K3_PSCI_SOURCES}			\
94				${K3_SEC_PROXY_SOURCES}			\
95				${K3_TI_SCI_SOURCES}			\
96