diff --git a/plat/nxp/common/soc_errata/errata.c b/plat/nxp/common/soc_errata/errata.c index 958cb3944..194c9c82a 100644 --- a/plat/nxp/common/soc_errata/errata.c +++ b/plat/nxp/common/soc_errata/errata.c @@ -5,10 +5,11 @@ * */ +#include #include #ifdef ERRATA_SOC_A050426 -void erratum_a050426(void) +static void erratum_a050426(void) { uint32_t i, val3, val4; @@ -416,3 +417,21 @@ void erratum_a050426(void) mmio_write_32(0x700117E90, val4); } #endif /* ERRATA_SOC_A050426 */ + +void soc_errata(void) +{ +#ifdef ERRATA_SOC_A050426 + INFO("SoC workaround for Errata A050426 was applied\n"); + erratum_a050426(); +#endif + /* + * The following DDR Erratas workaround are implemented in DDR driver, + * but print information here. + */ +#if ERRATA_DDR_A011396 + INFO("SoC workaround for DDR Errata A011396 was applied\n"); +#endif +#if ERRATA_DDR_A050450 + INFO("SoC workaround for DDR Errata A050450 was applied\n"); +#endif +} diff --git a/plat/nxp/soc-lx2160a/include/errata.h b/plat/nxp/common/soc_errata/errata.h similarity index 56% rename from plat/nxp/soc-lx2160a/include/errata.h rename to plat/nxp/common/soc_errata/errata.h index 937824a1c..b543b4bb9 100644 --- a/plat/nxp/soc-lx2160a/include/errata.h +++ b/plat/nxp/common/soc_errata/errata.h @@ -1,14 +1,13 @@ /* - * Copyright 2020 NXP + * Copyright 2020-2021 NXP * * SPDX-License-Identifier: BSD-3-Clause + * */ #ifndef ERRATA_H #define ERRATA_H -#ifdef ERRATA_SOC_A050426 -void erratum_a050426(void); -#endif +void soc_errata(void); #endif /* ERRATA_H */ diff --git a/plat/nxp/soc-lx2160a/soc.c b/plat/nxp/soc-lx2160a/soc.c index e0a2fe936..5c77540a7 100644 --- a/plat/nxp/soc-lx2160a/soc.c +++ b/plat/nxp/soc-lx2160a/soc.c @@ -271,9 +271,7 @@ void soc_early_init(void) MT_DEVICE | MT_RW | MT_NS); } -#ifdef ERRATA_SOC_A050426 - erratum_a050426(); -#endif + soc_errata(); #if (TRUSTED_BOARD_BOOT) || defined(POLICY_FUSE_PROVISION) sfp_init(NXP_SFP_ADDR); diff --git a/plat/nxp/soc-lx2160a/soc.mk b/plat/nxp/soc-lx2160a/soc.mk index 35da225ce..75a3af294 100644 --- a/plat/nxp/soc-lx2160a/soc.mk +++ b/plat/nxp/soc-lx2160a/soc.mk @@ -99,7 +99,8 @@ $(eval $(call SET_NXP_MAKE_FLAG,DDR_FIP_IO_NEEDED,BL2)) PLAT_INCLUDES += -I${PLAT_COMMON_PATH}/include/default\ -I${BOARD_PATH}\ -I${PLAT_COMMON_PATH}/include/default/ch_${CHASSIS}\ - -I${PLAT_SOC_PATH}/include + -I${PLAT_SOC_PATH}/include\ + -I${PLAT_COMMON_PATH}/soc_errata ifeq (${SECURE_BOOT},yes) include ${PLAT_COMMON_PATH}/tbbr/tbbr.mk