Skip to content

Commit

Permalink
zephyr: lib/dma.h: limit use of platform/lib/dma.h
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
kv2019i authored and lgirdwood committed Nov 22, 2024
1 parent 67b3288 commit 43b9ffb
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions zephyr/include/sof/lib/dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <platform/lib/dma.h>
#endif

#include <rtos/atomic.h>
#include <rtos/bit.h>
#include <rtos/alloc.h>
Expand Down

0 comments on commit 43b9ffb

Please sign in to comment.