1# 2# Copyright 2024-2025 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 -Idrivers/imx/usdhc \ 25 26PROGRAMMABLE_RESET_ADDRESS := 1 27 28COLD_BOOT_SINGLE_CPU := 0 29 30ENABLE_SVE_FOR_NS := 0 31 32RESET_TO_BL2 := 1 33 34INIT_UNUSED_NS_EL2 := 1 35 36ERRATA_A53_855873 := 1 37ERRATA_A53_836870 := 1 38ERRATA_A53_1530924 := 1 39ERRATA_SPECULATIVE_AT := 1 40ERRATA_S32_051700 := 1 41 42PLAT_XLAT_TABLES_DYNAMIC := 1 43$(eval $(call add_define,PLAT_XLAT_TABLES_DYNAMIC)) 44 45NXP_ESDHC_LE := 1 46$(eval $(call add_define,NXP_ESDHC_LE)) 47 48# Selecting Drivers for SoC 49$(eval $(call SET_NXP_MAKE_FLAG,CONSOLE_NEEDED,BL_COMM)) 50$(eval $(call SET_NXP_MAKE_FLAG,CLK_NEEDED,BL_COMM)) 51 52include ${PLAT_DRIVERS_PATH}/drivers.mk 53 54# Selecting the raw partition where the FIP image is stored 55FIP_PART ?= 0 56$(eval $(call add_define,FIP_PART)) 57 58BL_COMMON_SOURCES += \ 59 ${PLAT_S32G274ARDB2}/plat_console.c \ 60 ${PLAT_S32G274ARDB2}/plat_helpers.S \ 61 ${PLAT_S32G274ARDB2}/s32cc_bl_common.c \ 62 ${XLAT_TABLES_LIB_SRCS} \ 63 64BL2_SOURCES += \ 65 ${BL_COMMON_SOURCES} \ 66 ${PLAT_S32G274ARDB2}/plat_bl2_el3_setup.c \ 67 ${PLAT_S32G274ARDB2}/plat_bl2_image_desc.c \ 68 ${PLAT_S32G274ARDB2}/plat_io_storage.c \ 69 ${PLAT_S32G274ARDB2}/s32cc_ncore.c \ 70 common/desc_image_load.c \ 71 common/tf_crc32.c \ 72 drivers/delay_timer/delay_timer.c \ 73 drivers/delay_timer/generic_delay_timer.c \ 74 drivers/imx/usdhc/imx_usdhc.c \ 75 drivers/io/io_block.c \ 76 drivers/io/io_fip.c \ 77 drivers/io/io_memmap.c \ 78 drivers/io/io_storage.c \ 79 drivers/mmc/mmc.c \ 80 drivers/partition/gpt.c \ 81 drivers/partition/partition.c \ 82 lib/cpus/aarch64/cortex_a53.S \ 83 84BL2_CPPFLAGS += -march=armv8-a+crc 85 86BL31_SOURCES += \ 87 ${GICV3_SOURCES} \ 88 ${PLAT_S32G274ARDB2}/plat_bl31_setup.c \ 89 ${PLAT_S32G274ARDB2}/s32g2_psci.c \ 90 ${PLAT_S32G274ARDB2}/s32g2_soc.c \ 91 ${XLAT_TABLES_LIB_SRCS} \ 92 lib/cpus/aarch64/cortex_a53.S \ 93 plat/common/plat_gicv3.c \ 94 plat/common/plat_psci_common.c \ 95 96# process all errata flags 97$(eval $(call default_zeros, $(S32_ERRATA_LIST))) 98$(eval $(call add_defines, $(S32_ERRATA_LIST))) 99$(eval $(call assert_booleans, $(S32_ERRATA_LIST))) 100