From fa94317447bf34ce3a8e90c026ca055f2c59f125 Mon Sep 17 00:00:00 2001 From: wangbowen6 Date: Sat, 27 May 2023 13:36:47 +0800 Subject: [PATCH] openamp/Kconfig: add config to enable/disable the cache feature Signed-off-by: wangbowen6 --- openamp/Kconfig | 7 +++++++ openamp/open-amp.defs | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/openamp/Kconfig b/openamp/Kconfig index f8bbd62de7..a60ff0e4d6 100644 --- a/openamp/Kconfig +++ b/openamp/Kconfig @@ -11,4 +11,11 @@ config OPENAMP if OPENAMP +config OPENAMP_CACHE + bool "Enable OpenAMP Cache support" + default n + ---help--- + Enable or disable OpenAMP Cache support (VIRTIO_CACHED_BUFFERS and + VIRTIO_CACHED_VRINGS) + endif # OPENAMP diff --git a/openamp/open-amp.defs b/openamp/open-amp.defs index 4174483aa4..51e78358a5 100644 --- a/openamp/open-amp.defs +++ b/openamp/open-amp.defs @@ -20,6 +20,10 @@ ifeq ($(CONFIG_OPENAMP),y) +ifeq ($(CONFIG_OPENAMP_CACHE),y) + CFLAGS += -DVIRTIO_CACHED_BUFFERS -DVIRTIO_CACHED_VRINGS +endif + CSRCS += open-amp/lib/remoteproc/elf_loader.c CSRCS += open-amp/lib/remoteproc/remoteproc.c CSRCS += open-amp/lib/remoteproc/remoteproc_virtio.c