From 180b4df229d935f2655ac37623b235bb04f263fd Mon Sep 17 00:00:00 2001 From: Vincent Wan Date: Wed, 8 Jan 2020 17:10:51 -0800 Subject: [PATCH] soc: kconfig: add SOC_DEPRECATED_RELEASE Adding a Kconfig parameter so that we can indicate an SoC is to be deprecated, similar to what is being done for BOARD_DEPRECATED_RELEASE. Signed-off-by: Vincent Wan --- CMakeLists.txt | 7 +++++++ soc/Kconfig | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 82b6658e095..19f0f7d20a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1512,6 +1512,13 @@ if(CONFIG_BOARD_DEPRECATED_RELEASE) ) endif() +if(CONFIG_SOC_DEPRECATED_RELEASE) + message(WARNING " + WARNING: The SoC '${SOC_NAME}' is deprecated and will be + removed in version ${CONFIG_SOC_DEPRECATED_RELEASE}" + ) +endif() + # In CMake projects, 'CMAKE_BUILD_TYPE' usually determines the # optimization flag, but in Zephyr it is determined through # Kconfig. Here we give a warning when there is a mismatch between the diff --git a/soc/Kconfig b/soc/Kconfig index 78f0be73551..0dc8dfd4639 100644 --- a/soc/Kconfig +++ b/soc/Kconfig @@ -71,3 +71,11 @@ config SOC_RWDATA_LD under include/arch/. endif # ARC || ARM || X86 || NIOS2 || RISCV + +config SOC_DEPRECATED_RELEASE + string + help + This hidden option is set in the SoC configuration and indicates + the Zephyr release that the SoC configuration will be removed. + When set, any build for that SoC will generate a clearly visible + deprecation warning.