blob: d2511bbb379182768823a963a1eaa4e7220be099 [file] [log] [blame]
Jiafei Panf7b09ab2021-07-20 14:54:01 +08001#
2# Copyright 2021 NXP
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6# Platform Errata Build flags.
7# These should be enabled by the platform if the erratum workaround needs to be
8# applied.
9
10ERRATA := \
Jiafei Pan0b960e12021-10-21 16:57:58 +080011 ERRATA_SOC_A050426 \
12 ERRATA_SOC_A008850
Jiafei Panf7b09ab2021-07-20 14:54:01 +080013
Jiafei Pan41fe2d72021-08-24 12:01:27 +080014define enable_errata
Jiafei Panf7b09ab2021-07-20 14:54:01 +080015 $(1) ?= 0
16 ifeq ($$($(1)),1)
17 $$(eval $$(call add_define,$(1)))
Jiafei Pan41fe2d72021-08-24 12:01:27 +080018 BL2_SOURCES += $(PLAT_COMMON_PATH)/soc_errata/errata_a$(shell echo $(1)|awk -F '_A' '{print $$NF}').c
Jiafei Panf7b09ab2021-07-20 14:54:01 +080019 endif
20endef
21
Jiafei Pan41fe2d72021-08-24 12:01:27 +080022$(foreach e,$(ERRATA),$(eval $(call enable_errata,$(strip $(e)))))
Jiafei Panf7b09ab2021-07-20 14:54:01 +080023
24BL2_SOURCES += $(PLAT_COMMON_PATH)/soc_errata/errata.c