xref: /rk3399_ARM-atf/plat/nxp/s32/s32g274ardb2/platform.mk (revision 79629b1a79bd1ee254077d4e76fea05ba73b9bab)
1#
2# Copyright 2024 NXP
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7include drivers/arm/gic/v3/gicv3.mk
8include lib/xlat_tables_v2/xlat_tables.mk
9
10PLAT_DRIVERS_PATH := drivers/nxp
11PLAT_COMMON_PATH  := plat/nxp/common
12PLAT_S32G274ARDB2 := plat/nxp/s32/s32g274ardb2
13
14CONSOLE           := LINFLEX
15
16include ${PLAT_COMMON_PATH}/plat_make_helper/plat_build_macros.mk
17
18# Flag to apply S32 erratum ERR051700. This erratum applies to all S32
19# revisions.
20S32_ERRATA_LIST += ERRATA_S32_051700
21
22PLAT_INCLUDES = \
23	-I${PLAT_S32G274ARDB2}/include
24
25PROGRAMMABLE_RESET_ADDRESS := 1
26
27COLD_BOOT_SINGLE_CPU := 0
28
29ENABLE_SVE_FOR_NS := 0
30
31RESET_TO_BL2 := 1
32
33INIT_UNUSED_NS_EL2 := 1
34
35ERRATA_A53_855873 := 1
36ERRATA_A53_836870 := 1
37ERRATA_A53_1530924 := 1
38ERRATA_SPECULATIVE_AT := 1
39ERRATA_S32_051700 := 1
40
41# Selecting Drivers for SoC
42$(eval $(call SET_NXP_MAKE_FLAG,CONSOLE_NEEDED,BL_COMM))
43$(eval $(call SET_NXP_MAKE_FLAG,CLK_NEEDED,BL_COMM))
44
45include ${PLAT_DRIVERS_PATH}/drivers.mk
46
47BL_COMMON_SOURCES += \
48	${PLAT_S32G274ARDB2}/plat_console.c \
49	${PLAT_S32G274ARDB2}/plat_helpers.S \
50
51BL2_SOURCES += \
52	${BL_COMMON_SOURCES} \
53	${PLAT_S32G274ARDB2}/plat_bl2_el3_setup.c \
54	${PLAT_S32G274ARDB2}/plat_bl2_image_desc.c \
55	${PLAT_S32G274ARDB2}/plat_io_storage.c \
56	common/desc_image_load.c \
57	drivers/io/io_fip.c \
58	drivers/io/io_memmap.c \
59	drivers/io/io_storage.c \
60	lib/cpus/aarch64/cortex_a53.S \
61
62BL31_SOURCES += \
63	${GICV3_SOURCES} \
64	${PLAT_S32G274ARDB2}/plat_bl31_setup.c \
65	${PLAT_S32G274ARDB2}/s32g2_psci.c \
66	${PLAT_S32G274ARDB2}/s32g2_soc.c \
67	${XLAT_TABLES_LIB_SRCS} \
68	lib/cpus/aarch64/cortex_a53.S \
69	plat/common/plat_gicv3.c \
70	plat/common/plat_psci_common.c \
71
72# process all errata flags
73$(eval $(call default_zeros, $(S32_ERRATA_LIST)))
74$(eval $(call add_defines, $(S32_ERRATA_LIST)))
75$(eval $(call assert_booleans, $(S32_ERRATA_LIST)))
76