blob: 3deef3dd527d15221309b8593c6391b01aeec54b [file] [log] [blame]
Jiafei Panf7b09ab2021-07-20 14:54:01 +08001#
Jiafei Pan5cd4c122022-02-18 18:30:05 +08002# Copyright 2021-2022 NXP
Jiafei Panf7b09ab2021-07-20 14:54:01 +08003#
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 \
Jiafei Pan5cd4c122022-02-18 18:30:05 +080012 ERRATA_SOC_A008850 \
Jiafei Pan86a96d92022-02-18 18:32:18 +080013 ERRATA_SOC_A009660 \
14 ERRATA_SOC_A010539
Jiafei Panf7b09ab2021-07-20 14:54:01 +080015
Jiafei Pan41fe2d72021-08-24 12:01:27 +080016define enable_errata
Jiafei Panf7b09ab2021-07-20 14:54:01 +080017 $(1) ?= 0
18 ifeq ($$($(1)),1)
19 $$(eval $$(call add_define,$(1)))
Jiafei Pan41fe2d72021-08-24 12:01:27 +080020 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 +080021 endif
22endef
23
Jiafei Pan41fe2d72021-08-24 12:01:27 +080024$(foreach e,$(ERRATA),$(eval $(call enable_errata,$(strip $(e)))))
Jiafei Panf7b09ab2021-07-20 14:54:01 +080025
26BL2_SOURCES += $(PLAT_COMMON_PATH)/soc_errata/errata.c