From 43b9ffbe4989791b231321f7070c74456ea24740 Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Thu, 14 Nov 2024 15:27:40 +0200 Subject: [PATCH] zephyr: lib/dma.h: limit use of platform/lib/dma.h The platform lib/dma.h definitions are only needed in a small set of usages. Make the inclusion conditional and add a note to guide new configurations to use CONFIG_DMA_DOMAIN instead. Signed-off-by: Kai Vehmanen --- zephyr/include/sof/lib/dma.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/zephyr/include/sof/lib/dma.h b/zephyr/include/sof/lib/dma.h index 652c345979e3..6a25c81321ac 100644 --- a/zephyr/include/sof/lib/dma.h +++ b/zephyr/include/sof/lib/dma.h @@ -6,7 +6,18 @@ #ifndef __SOF_LIB_DMA_H__ #define __SOF_LIB_DMA_H__ +#if defined(CONFIG_SCHEDULE_DMA_MULTI_CHANNEL) || \ + defined(CONFIG_SCHEDULE_DMA_SINGLE_CHANNEL) +/* + * The platform/lib/dma.h definitions are only needed + * when using old dma_{single,multi}_chan_domain + * implementations. For new SOF build targets, it is + * recommended to use CONFIG_DMA_DOMAIN instead if + * DMA-driven scheduling is needed. + */ #include +#endif + #include #include #include