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
30
31NS_TIMER_SWITCH		:=	0
32
33# Split out RO data into a non-executable section
34SEPARATE_CODE_AND_RODATA :=    1
35
36# Generate a Position Independent Executable
37ENABLE_PIE		:=	1
38
39TI_16550_MDR_QUIRK	:=	1
40$(eval $(call add_define,TI_16550_MDR_QUIRK))
41
42K3_USART		:=	0
43$(eval $(call add_define,K3_USART))
44
45# Allow customizing the UART baud rate
46K3_USART_BAUD		:=	115200
47$(eval $(call add_define,K3_USART_BAUD))
48
49# Libraries
50include lib/xlat_tables_v2/xlat_tables.mk
51
52PLAT_INCLUDES		+=	\
53				-I${PLAT_PATH}/include			\
54				-I${PLAT_PATH}/common/drivers/sec_proxy	\
55				-I${PLAT_PATH}/common/drivers/ti_sci	\
56
57K3_CONSOLE_SOURCES	+=	\
58				drivers/ti/uart/aarch64/16550_console.S	\
59				${PLAT_PATH}/common/k3_console.c	\
60
61# Include GICv3 driver files
62include drivers/arm/gic/v3/gicv3.mk
63
64K3_GIC_SOURCES		+=	\
65				${GICV3_SOURCES}			\
66				plat/common/plat_gicv3.c		\
67				${PLAT_PATH}/common/k3_gicv3.c		\
68
69K3_PSCI_SOURCES		+=	\
70				plat/common/plat_psci_common.c		\
71				${PLAT_PATH}/common/k3_psci.c		\
72
73K3_SEC_PROXY_SOURCES	+=	\
74				${PLAT_PATH}/common/drivers/sec_proxy/sec_proxy.c \
75
76K3_TI_SCI_SOURCES	+=	\
77				${PLAT_PATH}/common/drivers/ti_sci/ti_sci.c \
78
79PLAT_BL_COMMON_SOURCES	+=	\
80				lib/cpus/aarch64/cortex_a53.S		\
81				lib/cpus/aarch64/cortex_a72.S		\
82				${XLAT_TABLES_LIB_SRCS}			\
83				${K3_CONSOLE_SOURCES}			\
84
85BL31_SOURCES		+=	\
86				${PLAT_PATH}/common/k3_bl31_setup.c	\
87				${PLAT_PATH}/common/k3_helpers.S	\
88				${PLAT_PATH}/common/k3_topology.c	\
89				${K3_GIC_SOURCES}			\
90				${K3_PSCI_SOURCES}			\
91				${K3_SEC_PROXY_SOURCES}			\
92				${K3_TI_SCI_SOURCES}			\
93