cache: adds CONFIG_SOC_CACHE

This allows SoC to define their custom cache related functions
and are used by sys_cache_*() functions.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung
2025-10-29 13:31:21 -07:00
committed by Henrik Brix Andersen
parent 169304813a
commit a8c1df6b80
3 changed files with 17 additions and 0 deletions

View File

@@ -1159,6 +1159,14 @@ config ARCH_CACHE
help
Integrated on-core cache controller
config SOC_CACHE
bool "SoC specific cache controller"
depends on SOC_HAS_CACHE_FUNCTIONS
help
SoC specific cache controller.
This requires soc_cache.h file to exist in search path.
config EXTERNAL_CACHE
bool "External cache controller"
help

View File

@@ -27,6 +27,9 @@ extern "C" {
#elif defined(CONFIG_ARCH_CACHE)
#include <zephyr/arch/cache.h>
#elif defined(CONFIG_SOC_CACHE)
#include <soc_cache.h>
#endif
/**

View File

@@ -40,3 +40,9 @@ config SOC_HAS_RUNTIME_NUM_CPUS
help
Should be selected if SoC handles determining the number of CPUs
at runtime.
config SOC_HAS_CACHE_FUNCTIONS
bool
help
Should be selected if SoC provides custom method for cache related
operations.