From 643723479fddb7651764120ef8e36c13d392b46a Mon Sep 17 00:00:00 2001 From: Vinayak Kariappa Chettimada Date: Wed, 15 Mar 2023 09:39:29 +0530 Subject: [PATCH] drivers: flash: nRF: Move sync ticker to Subsys Bluetooth Controller Move the SoC Flash nRF sync ticker implementation into Bluetooth Controller Subsystem folder, as internal headers are included. Signed-off-by: Vinayak Kariappa Chettimada --- drivers/flash/CMakeLists.txt | 7 ------- subsys/bluetooth/controller/CMakeLists.txt | 10 ++++++++++ .../controller}/flash/soc_flash_nrf_ticker.c | 14 +++++++------- 3 files changed, 17 insertions(+), 14 deletions(-) rename {drivers => subsys/bluetooth/controller}/flash/soc_flash_nrf_ticker.c (98%) diff --git a/drivers/flash/CMakeLists.txt b/drivers/flash/CMakeLists.txt index a9b11e0d7a..0d474daa43 100644 --- a/drivers/flash/CMakeLists.txt +++ b/drivers/flash/CMakeLists.txt @@ -10,7 +10,6 @@ zephyr_library_sources_ifdef(CONFIG_FLASH_SIMULATOR flash_simulator.c) zephyr_library_sources_ifdef(CONFIG_SPI_FLASH_AT45 spi_flash_at45.c) zephyr_library_sources_ifdef(CONFIG_SOC_FLASH_ITE_IT8XXX2 flash_ite_it8xxx2.c) zephyr_library_sources_ifdef(CONFIG_SOC_FLASH_NRF soc_flash_nrf.c) -zephyr_library_sources_ifdef(CONFIG_SOC_FLASH_NRF_RADIO_SYNC_TICKER soc_flash_nrf_ticker.c) zephyr_library_sources_ifdef(CONFIG_SOC_FLASH_MCUX soc_flash_mcux.c) zephyr_library_sources_ifdef(CONFIG_SOC_FLASH_LPC soc_flash_lpc.c) zephyr_library_sources_ifdef(CONFIG_FLASH_PAGE_LAYOUT flash_page_layout.c) @@ -84,11 +83,5 @@ zephyr_library_include_directories_ifdef( ${ZEPHYR_BASE}/drivers/memc ) -zephyr_library_include_directories_ifdef( - CONFIG_SOC_FLASH_NRF_RADIO_SYNC_TICKER - ${ZEPHYR_BASE}/subsys/bluetooth - ${ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw/nordic - ) - zephyr_library_sources_ifdef(CONFIG_FLASH_SHELL flash_shell.c) zephyr_library_sources_ifdef(CONFIG_FLASH_JESD216 jesd216.c) diff --git a/subsys/bluetooth/controller/CMakeLists.txt b/subsys/bluetooth/controller/CMakeLists.txt index 0b968cf1cf..679272fab9 100644 --- a/subsys/bluetooth/controller/CMakeLists.txt +++ b/subsys/bluetooth/controller/CMakeLists.txt @@ -160,6 +160,11 @@ zephyr_library_sources_ifdef( crypto/crypto.c ) +zephyr_library_sources_ifdef( + CONFIG_SOC_FLASH_NRF_RADIO_SYNC_TICKER + flash/soc_flash_nrf_ticker.c + ) + add_subdirectory_ifdef( CONFIG_BT_CTLR_COEX_DRIVERS coex @@ -181,6 +186,11 @@ zephyr_library_include_directories_ifdef( ../crypto ) +zephyr_library_include_directories_ifdef( + CONFIG_SOC_FLASH_NRF_RADIO_SYNC_TICKER + ${ZEPHYR_BASE}/drivers/flash +) + zephyr_library_compile_options_ifdef( CONFIG_BT_CTLR_OPTIMIZE_FOR_SPEED ${OPTIMIZE_FOR_SPEED_FLAG} diff --git a/drivers/flash/soc_flash_nrf_ticker.c b/subsys/bluetooth/controller/flash/soc_flash_nrf_ticker.c similarity index 98% rename from drivers/flash/soc_flash_nrf_ticker.c rename to subsys/bluetooth/controller/flash/soc_flash_nrf_ticker.c index 989a163ca1..8b9696e988 100644 --- a/drivers/flash/soc_flash_nrf_ticker.c +++ b/subsys/bluetooth/controller/flash/soc_flash_nrf_ticker.c @@ -6,18 +6,18 @@ #include +#include #include #include #include -#include - -#include "soc_flash_nrf.h" - #include #include -#include "controller/hal/ticker.h" -#include "controller/ticker/ticker.h" -#include "controller/include/ll.h" + +#include "hal/ticker.h" +#include "ticker/ticker.h" +#include "ll.h" + +#include "soc_flash_nrf.h" #define FLASH_RADIO_ABORT_DELAY_US 1500 #define FLASH_RADIO_WORK_DELAY_US 200