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