From 0a9ad40a85491236517e01ea5a38b23f3aff3f21 Mon Sep 17 00:00:00 2001 From: Emanuele Di Santo Date: Mon, 5 Aug 2024 14:01:46 +0200 Subject: [PATCH] soc: nordic: move mpu_regions.c to common folder and rename Move mpu_region.c to common folder, to re-use with nRF92. Rename it to nrf54hx_nrf92x_mpu_regions.c to indicate which product series it applies to. Signed-off-by: Emanuele Di Santo --- soc/nordic/common/CMakeLists.txt | 4 ++++ .../mpu_regions.c => common/nrf54hx_nrf92x_mpu_regions.c} | 0 soc/nordic/nrf54h/CMakeLists.txt | 2 -- 3 files changed, 4 insertions(+), 2 deletions(-) rename soc/nordic/{nrf54h/mpu_regions.c => common/nrf54hx_nrf92x_mpu_regions.c} (100%) diff --git a/soc/nordic/common/CMakeLists.txt b/soc/nordic/common/CMakeLists.txt index 513a3a968b8..37f27e250de 100644 --- a/soc/nordic/common/CMakeLists.txt +++ b/soc/nordic/common/CMakeLists.txt @@ -13,6 +13,10 @@ endif() zephyr_library_sources_ifdef(CONFIG_POWEROFF poweroff.c) +if((CONFIG_SOC_SERIES_NRF54HX OR CONFIG_SOC_SERIES_NRF92X) AND CONFIG_CPU_HAS_CUSTOM_FIXED_SOC_MPU_REGIONS) + zephyr_library_sources(nrf54hx_nrf92x_mpu_regions.c) +endif() + zephyr_include_directories(.) if(CONFIG_HAS_NORDIC_DMM) diff --git a/soc/nordic/nrf54h/mpu_regions.c b/soc/nordic/common/nrf54hx_nrf92x_mpu_regions.c similarity index 100% rename from soc/nordic/nrf54h/mpu_regions.c rename to soc/nordic/common/nrf54hx_nrf92x_mpu_regions.c diff --git a/soc/nordic/nrf54h/CMakeLists.txt b/soc/nordic/nrf54h/CMakeLists.txt index 88e45de0046..1aa4723814f 100644 --- a/soc/nordic/nrf54h/CMakeLists.txt +++ b/soc/nordic/nrf54h/CMakeLists.txt @@ -5,8 +5,6 @@ if(CONFIG_ARM) zephyr_library_sources(soc.c) endif() -zephyr_library_sources_ifdef(CONFIG_CPU_HAS_CUSTOM_FIXED_SOC_MPU_REGIONS mpu_regions.c) - zephyr_include_directories(.) # Ensure that image size aligns with 16 bytes so that MRAMC finalizes all writes