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 <vincent.wan@linaro.org>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 82b6658..19f0f7d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1512,6 +1512,13 @@
)
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 78f0be7..0dc8dfd 100644
--- a/soc/Kconfig
+++ b/soc/Kconfig
@@ -71,3 +71,11 @@
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.