From d540cf8877f5a0072a366a679ab34d401efbe479 Mon Sep 17 00:00:00 2001 From: Carlo Caione Date: Mon, 12 Dec 2022 12:56:04 +0100 Subject: [PATCH] openamp: Add new Kconfig option to enable dcache Currently OpenAMP is unconditionally compiled with the options to use the vrings cache operations disabled. Add a new CONFIG_OPENAMP_WITH_DCACHE Kconfig option to enable the support for d-cache operations in OpenAMP when needed. Signed-off-by: Carlo Caione --- lib/open-amp/CMakeLists.txt | 4 ++++ lib/open-amp/Kconfig | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/lib/open-amp/CMakeLists.txt b/lib/open-amp/CMakeLists.txt index 5d7fb289a76..72868892d57 100644 --- a/lib/open-amp/CMakeLists.txt +++ b/lib/open-amp/CMakeLists.txt @@ -6,3 +6,7 @@ zephyr_include_directories_ifdef(CONFIG_OPENAMP_RSC_TABLE .) zephyr_sources_ifdef(CONFIG_OPENAMP_RSC_TABLE resource_table.c) + +zephyr_compile_definitions_ifdef(CONFIG_OPENAMP_WITH_DCACHE + WITH_DCACHE_VRINGS + WITH_DCACHE_BUFFERS) diff --git a/lib/open-amp/Kconfig b/lib/open-amp/Kconfig index c37ee967fce..4c43e1a2bea 100644 --- a/lib/open-amp/Kconfig +++ b/lib/open-amp/Kconfig @@ -18,3 +18,10 @@ config OPENAMP_RSC_TABLE_NUM_RPMSG_BUFF help This option specifies the number of buffer used in a Vring for interprocessor communication + +config OPENAMP_WITH_DCACHE + bool "Build OpenAMP with vrings cache operations enabled" + default y + depends on CACHE_MANAGEMENT + help + Build OpenAMP with vrings cache operations enabled.