From bbcb577f8ece0f638e2bf525a220449c65702d66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?= Date: Thu, 16 Jan 2025 12:22:17 +0100 Subject: [PATCH] [nrf fromtree] modules: hal_nordic: nrfx: Move some defines back to CMakeLists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 534916c2253 moved some defines from CMakeLists.txt to nrfx_kconfig.h but those defines are used by MDK which does not include nrfx_kconfig.h and that broke some nrf platforms (e.g. nrf54l20). Moving those defines back to CMakeLists.txt. Signed-off-by: Krzysztof Chruściński (cherry picked from commit 738549ed2778f0d24ad031bef7d629ffb4174d77) --- modules/hal_nordic/nrfx/CMakeLists.txt | 10 ++++++++++ modules/hal_nordic/nrfx/nrfx_kconfig.h | 20 -------------------- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/modules/hal_nordic/nrfx/CMakeLists.txt b/modules/hal_nordic/nrfx/CMakeLists.txt index 21f8b64c16f..0954f111618 100644 --- a/modules/hal_nordic/nrfx/CMakeLists.txt +++ b/modules/hal_nordic/nrfx/CMakeLists.txt @@ -188,6 +188,16 @@ if(CONFIG_SOC_NRF54L_CPUAPP_COMMON) zephyr_compile_definitions("NRF_CONFIG_CPU_FREQ_MHZ=${clock_frequency_mhz}") endif() +zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54LX_SKIP_CLOCK_CONFIG NRF_SKIP_CLOCK_CONFIGURATION) +zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54LX_DISABLE_FICR_TRIMCNF NRF_DISABLE_FICR_TRIMCNF) +zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54LX_SKIP_GLITCHDETECTOR_DISABLE NRF_SKIP_GLITCHDETECTOR_DISABLE) + +# Inject code to skip TAMPC setup for nRF54L20 and nRF54L09. It is not supported for now. +# It needs to be removed when support is provided. +if(CONFIG_SOC_NRF54L20_ENGA_CPUAPP OR CONFIG_SOC_NRF54L09_ENGA_CPUAPP) + zephyr_compile_definitions(NRF_SKIP_TAMPC_SETUP) +endif() + if(CONFIG_SOC_COMPATIBLE_NRF54LX AND CONFIG_NRFX_GPPI) zephyr_library_sources(${HELPERS_DIR}/nrfx_gppi_dppi_ppib_lumos.c) zephyr_library_sources(${NRFX_DIR}/soc/interconnect/dppic_ppib/nrfx_interconnect_dppic_ppib.c) diff --git a/modules/hal_nordic/nrfx/nrfx_kconfig.h b/modules/hal_nordic/nrfx/nrfx_kconfig.h index c93a8231e1d..1eb51f99724 100644 --- a/modules/hal_nordic/nrfx/nrfx_kconfig.h +++ b/modules/hal_nordic/nrfx/nrfx_kconfig.h @@ -964,26 +964,6 @@ CONFIG_NRF52_ANOMALY_109_WORKAROUND_EGU_INSTANCE #endif -#ifdef CONFIG_SOC_NRF54LX_SKIP_CLOCK_CONFIG -#define NRF_SKIP_CLOCK_CONFIGURATION -#endif - -#ifdef CONFIG_SOC_NRF54LX_DISABLE_FICR_TRIMCNF -#define NRF_DISABLE_FICR_TRIMCNF -#endif - -#ifdef CONFIG_SOC_NRF54LX_SKIP_GLITCHDETECTOR_DISABLE -#define NRF_SKIP_GLITCHDETECTOR_DISABLE -#endif - -/* - * Inject code to skip TAMPC setup for nRF54L20 and nRF54L09. It is not supported for now. - * It needs to be removed when support is provided. - */ -#if defined(CONFIG_SOC_NRF54L20_ENGA_CPUAPP) || defined(CONFIG_SOC_NRF54L09_ENGA_CPUAPP) -#define NRF_SKIP_TAMPC_SETUP -#endif - #if DT_HAS_COMPAT_STATUS_OKAY(nordic_nrf_dppic_global) || \ DT_HAS_COMPAT_STATUS_OKAY(nordic_nrf_dppic_local) #ifndef NRFX_DPPI_ENABLED