From d7dc942382a2c05539c14f8df32d5756fd88a9a2 Mon Sep 17 00:00:00 2001 From: Gerard Marull-Paretas Date: Thu, 1 Feb 2024 10:40:53 +0100 Subject: [PATCH] soc: common: nordic_nrf: move pinctrl_soc.h to a common dir Because both, RISC-V and ARM cores share the same pinctrl driver. The top level common folder will disappear with the introduction of HWMv2, where multi-arch SoCs will be well supported. Signed-off-by: Gerard Marull-Paretas --- boards/posix/nrf_bsim/soc/pinctrl_soc.h | 2 +- soc/CMakeLists.txt | 2 ++ soc/common/CMakeLists.txt | 4 ++++ soc/common/nordic_nrf/CMakeLists.txt | 4 ++++ .../nordic_nrf/common => common/nordic_nrf}/pinctrl_soc.h | 0 5 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 soc/common/CMakeLists.txt create mode 100644 soc/common/nordic_nrf/CMakeLists.txt rename soc/{arm/nordic_nrf/common => common/nordic_nrf}/pinctrl_soc.h (100%) diff --git a/boards/posix/nrf_bsim/soc/pinctrl_soc.h b/boards/posix/nrf_bsim/soc/pinctrl_soc.h index 08252b57fee..f0be0443d5b 100644 --- a/boards/posix/nrf_bsim/soc/pinctrl_soc.h +++ b/boards/posix/nrf_bsim/soc/pinctrl_soc.h @@ -8,6 +8,6 @@ #define BOARDS_POSIX_NRF_BSIM_SOC_PINCTRL_SOC_H /* We reuse the real SOC's header: */ -#include "../soc/arm/nordic_nrf/common/pinctrl_soc.h" +#include "../soc/common/nordic_nrf/pinctrl_soc.h" #endif /* BOARDS_POSIX_NRF_BSIM_SOC_PINCTRL_SOC_H */ diff --git a/soc/CMakeLists.txt b/soc/CMakeLists.txt index 6706168281e..d55bd63f496 100644 --- a/soc/CMakeLists.txt +++ b/soc/CMakeLists.txt @@ -9,6 +9,8 @@ if(_SOC_IS_IN_TREE) endif() unset(_SOC_IS_IN_TREE) +add_subdirectory(common) + if(EXISTS ${SOC_DIR}/${ARCH}/CMakeLists.txt) add_subdirectory(${SOC_DIR}/${ARCH} soc/${ARCH}) else() diff --git a/soc/common/CMakeLists.txt b/soc/common/CMakeLists.txt new file mode 100644 index 00000000000..d9abad218cd --- /dev/null +++ b/soc/common/CMakeLists.txt @@ -0,0 +1,4 @@ +# Copyright (c) 2024 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +add_subdirectory_ifdef(CONFIG_SOC_FAMILY_NRF nordic_nrf) diff --git a/soc/common/nordic_nrf/CMakeLists.txt b/soc/common/nordic_nrf/CMakeLists.txt new file mode 100644 index 00000000000..6f397a07fab --- /dev/null +++ b/soc/common/nordic_nrf/CMakeLists.txt @@ -0,0 +1,4 @@ +# Copyright (c) 2024 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +zephyr_include_directories(.) diff --git a/soc/arm/nordic_nrf/common/pinctrl_soc.h b/soc/common/nordic_nrf/pinctrl_soc.h similarity index 100% rename from soc/arm/nordic_nrf/common/pinctrl_soc.h rename to soc/common/nordic_nrf/pinctrl_soc.h