From db63e563a950dbea4ebd8213009a701d2f0247f5 Mon Sep 17 00:00:00 2001 From: Jacob Wienecke Date: Tue, 18 Feb 2025 10:05:37 -0600 Subject: [PATCH] drivers: memc: memc_nxp_flexram.h: Move to the public includes directory Moved to: include/zephyr/drivers/misc/flexram/memc_nxp_flexram.h This change makes it so that the .h file does not need to be pulled in using the CMakeLists.txt file, and can be included like other public includes. Removes drivers/memc/memc_nxp_flexram.h Add memc_nxp_flexram.h to include/zephyr/drivers/misc/flexram Modify drivers/memc/memc_nxp_flexram.c to use the new include path. Modifies the mimxrt1170 magic_addr sample to include the driver using the new include path. Modify the soc file: soc/nxp/imxrt/imxrt11xx/soc.c to use the new path. Add relevant information to migration-guide-4.2.rst. Signed-off-by: Jacob Wienecke Co-authored-by: Declan Snyder --- doc/releases/migration-guide-4.2.rst | 9 +++++++++ drivers/memc/memc_nxp_flexram.c | 2 +- .../zephyr/drivers/misc/flexram/nxp_flexram.h | 0 .../nxp/mimxrt1170_evk_cm7/magic_addr/CMakeLists.txt | 2 -- .../boards/nxp/mimxrt1170_evk_cm7/magic_addr/src/main.c | 2 +- soc/nxp/imxrt/imxrt10xx/soc.c | 2 +- soc/nxp/imxrt/imxrt11xx/soc.c | 2 +- 7 files changed, 13 insertions(+), 6 deletions(-) rename drivers/memc/memc_nxp_flexram.h => include/zephyr/drivers/misc/flexram/nxp_flexram.h (100%) diff --git a/doc/releases/migration-guide-4.2.rst b/doc/releases/migration-guide-4.2.rst index 732c4b08fea..bd198b9d204 100644 --- a/doc/releases/migration-guide-4.2.rst +++ b/doc/releases/migration-guide-4.2.rst @@ -228,6 +228,15 @@ Stepper * Refactored the ``stepper_enable(const struct device * dev, bool enable)`` function to :c:func:`stepper_enable` & :c:func:`stepper_disable`. +Misc +==== + +* Moved file ``drivers/memc/memc_nxp_flexram.h`` to + :zephyr_file:`include/zephyr/drivers/misc/flexram/nxp_flexram.h` so that the + file can be included using ````. + Modification to CMakeList.txt to use include this driver is no longer + required. + Bluetooth ********* diff --git a/drivers/memc/memc_nxp_flexram.c b/drivers/memc/memc_nxp_flexram.c index 39da8349e1a..fb200d63b86 100644 --- a/drivers/memc/memc_nxp_flexram.c +++ b/drivers/memc/memc_nxp_flexram.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "memc_nxp_flexram.h" +#include #include #include #include diff --git a/drivers/memc/memc_nxp_flexram.h b/include/zephyr/drivers/misc/flexram/nxp_flexram.h similarity index 100% rename from drivers/memc/memc_nxp_flexram.h rename to include/zephyr/drivers/misc/flexram/nxp_flexram.h diff --git a/samples/boards/nxp/mimxrt1170_evk_cm7/magic_addr/CMakeLists.txt b/samples/boards/nxp/mimxrt1170_evk_cm7/magic_addr/CMakeLists.txt index b8af716702a..6f7101fa1cf 100644 --- a/samples/boards/nxp/mimxrt1170_evk_cm7/magic_addr/CMakeLists.txt +++ b/samples/boards/nxp/mimxrt1170_evk_cm7/magic_addr/CMakeLists.txt @@ -5,6 +5,4 @@ cmake_minimum_required(VERSION 3.20.0) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) project(magic_addr) -zephyr_library_include_directories(${ZEPHYR_BASE}/drivers/memc) - target_sources(app PRIVATE src/main.c) diff --git a/samples/boards/nxp/mimxrt1170_evk_cm7/magic_addr/src/main.c b/samples/boards/nxp/mimxrt1170_evk_cm7/magic_addr/src/main.c index f44c3f23923..a654946e60d 100644 --- a/samples/boards/nxp/mimxrt1170_evk_cm7/magic_addr/src/main.c +++ b/samples/boards/nxp/mimxrt1170_evk_cm7/magic_addr/src/main.c @@ -6,7 +6,7 @@ #include #include -#include "memc_nxp_flexram.h" +#include #include #include #include diff --git a/soc/nxp/imxrt/imxrt10xx/soc.c b/soc/nxp/imxrt/imxrt10xx/soc.c index 83135d7d834..ea870c84ed0 100644 --- a/soc/nxp/imxrt/imxrt10xx/soc.c +++ b/soc/nxp/imxrt/imxrt10xx/soc.c @@ -22,7 +22,7 @@ #include "usb.h" #endif -#include "memc_nxp_flexram.h" +#include #include diff --git a/soc/nxp/imxrt/imxrt11xx/soc.c b/soc/nxp/imxrt/imxrt11xx/soc.c index e8261016bb3..6f2505e0c18 100644 --- a/soc/nxp/imxrt/imxrt11xx/soc.c +++ b/soc/nxp/imxrt/imxrt11xx/soc.c @@ -37,7 +37,7 @@ LOG_MODULE_REGISTER(soc, CONFIG_SOC_LOG_LEVEL); #include "usb_phy.h" #include "usb.h" #endif -#include "memc_nxp_flexram.h" +#include #include