From 36e7322ad4fcb1e81460cee38b54cc322f228e61 Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Thu, 14 Nov 2024 15:38:04 +0200 Subject: [PATCH 1/3] platform: cavs: remove XTOS Kconfig items Remove unused Kconfig dependencies for CONFIG_CAVS. These were valid entries for XTOS builds, but as CAVS no longer has any XTOS suppot in the tree, these can be now removed. Equivalent settings are now moved all to Zephyr. Signed-off-by: Kai Vehmanen --- src/platform/Kconfig | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/platform/Kconfig b/src/platform/Kconfig index 68633616a7d8..ce972d1d9fc8 100644 --- a/src/platform/Kconfig +++ b/src/platform/Kconfig @@ -339,11 +339,7 @@ config CAVS bool default n select INTEL - select XT_INTERRUPT_LEVEL_2 - select XT_INTERRUPT_LEVEL_5 select INTEL_MN - select WAKEUP_HOOK - select SCHEDULE_DMA_SINGLE_CHANNEL config CAVS_VERSION_2_5 depends on CAVS From 0daea7df8d1941867c7e062183fbc0cc6bafe3c7 Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Thu, 14 Nov 2024 15:27:40 +0200 Subject: [PATCH 2/3] 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 From eb516a9c957f3001e2185dbdf512861a62804c35 Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Thu, 14 Nov 2024 15:31:03 +0200 Subject: [PATCH 3/3] platform: intel: remove lib/dma.h for all Intel targets The platform lib/dma.h is no longer needed in SOF Zephyr builds unless the legacy DMA domain scheduler is used. This is not the case for any Intel target, so the lib/dma.h headers can be removed. Signed-off-by: Kai Vehmanen --- src/platform/ace30/include/platform/lib/dma.h | 23 ------- .../lunarlake/include/platform/lib/dma.h | 20 ------ .../meteorlake/include/platform/lib/dma.h | 23 ------- .../tigerlake/include/platform/lib/dma.h | 66 ------------------- 4 files changed, 132 deletions(-) delete mode 100644 src/platform/ace30/include/platform/lib/dma.h delete mode 100644 src/platform/lunarlake/include/platform/lib/dma.h delete mode 100644 src/platform/meteorlake/include/platform/lib/dma.h delete mode 100644 src/platform/tigerlake/include/platform/lib/dma.h diff --git a/src/platform/ace30/include/platform/lib/dma.h b/src/platform/ace30/include/platform/lib/dma.h deleted file mode 100644 index 48a37b2b635a..000000000000 --- a/src/platform/ace30/include/platform/lib/dma.h +++ /dev/null @@ -1,23 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * - * Copyright(c) 2022-2024 Intel Corporation. - */ - -#ifdef __SOF_LIB_DMA_H__ - -#ifndef __PLATFORM_LIB_DMA_H__ -#define __PLATFORM_LIB_DMA_H__ - -/* max number of supported DMA channels */ -#define PLATFORM_MAX_DMA_CHAN 9 - -/* number of supported DMACs */ -#define PLATFORM_NUM_DMACS 6 - -#endif /* __PLATFORM_LIB_DMA_H__ */ - -#else - -#error "This file shouldn't be included from outside of sof/lib/dma.h" - -#endif /* __SOF_LIB_DMA_H__ */ diff --git a/src/platform/lunarlake/include/platform/lib/dma.h b/src/platform/lunarlake/include/platform/lib/dma.h deleted file mode 100644 index c820f6e2c9e9..000000000000 --- a/src/platform/lunarlake/include/platform/lib/dma.h +++ /dev/null @@ -1,20 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * - * Copyright(c) 2023 Intel Corporation. All rights reserved. - */ - -#ifdef __SOF_LIB_DMA_H__ - -#ifndef __PLATFORM_LIB_DMA_H__ -#define __PLATFORM_LIB_DMA_H__ - -/* max number of supported DMA channels */ -#define PLATFORM_MAX_DMA_CHAN 11 - -#endif /* __PLATFORM_LIB_DMA_H__ */ - -#else - -#error "This file shouldn't be included from outside of sof/lib/dma.h" - -#endif /* __SOF_LIB_DMA_H__ */ diff --git a/src/platform/meteorlake/include/platform/lib/dma.h b/src/platform/meteorlake/include/platform/lib/dma.h deleted file mode 100644 index ca10b4937c99..000000000000 --- a/src/platform/meteorlake/include/platform/lib/dma.h +++ /dev/null @@ -1,23 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * - * Copyright(c) 2022 Intel Corporation. All rights reserved. - */ - -#ifdef __SOF_LIB_DMA_H__ - -#ifndef __PLATFORM_LIB_DMA_H__ -#define __PLATFORM_LIB_DMA_H__ - -/* max number of supported DMA channels */ -#define PLATFORM_MAX_DMA_CHAN 9 - -/* number of supported DMACs */ -#define PLATFORM_NUM_DMACS 6 - -#endif /* __PLATFORM_LIB_DMA_H__ */ - -#else - -#error "This file shouldn't be included from outside of sof/lib/dma.h" - -#endif /* __SOF_LIB_DMA_H__ */ diff --git a/src/platform/tigerlake/include/platform/lib/dma.h b/src/platform/tigerlake/include/platform/lib/dma.h deleted file mode 100644 index 4dfae664ae11..000000000000 --- a/src/platform/tigerlake/include/platform/lib/dma.h +++ /dev/null @@ -1,66 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * - * Copyright(c) 2017 Intel Corporation. All rights reserved. - * - * Author: Liam Girdwood - * Keyon Jie - * Rander Wang - */ - -#ifdef __SOF_LIB_DMA_H__ - -#ifndef __PLATFORM_LIB_DMA_H__ -#define __PLATFORM_LIB_DMA_H__ - -/* number of supported DMACs */ -#define PLATFORM_NUM_DMACS 6 - -/* max number of supported DMA channels */ -#define PLATFORM_MAX_DMA_CHAN 9 - -/* available DMACs */ -#define DMA_GP_LP_DMAC0 0 -#define DMA_GP_LP_DMAC1 1 -#define DMA_GP_HP_DMAC0 2 -#define DMA_GP_HP_DMAC1 3 -#define DMA_HOST_IN_DMAC 4 -#define DMA_HOST_OUT_DMAC 5 -#define DMA_LINK_IN_DMAC 6 -#define DMA_LINK_OUT_DMAC 7 - -/* mappings - TODO improve API to get type */ -#define DMA_ID_DMAC0 DMA_HOST_IN_DMAC -#define DMA_ID_DMAC1 DMA_GP_LP_DMAC0 -#define DMA_ID_DMAC2 DMA_HOST_OUT_DMAC -#define DMA_ID_DMAC3 DMA_GP_HP_DMAC0 -#define DMA_ID_DMAC4 DMA_GP_LP_DMAC1 -#define DMA_ID_DMAC5 DMA_GP_HP_DMAC1 -#define DMA_ID_DMAC6 DMA_LINK_IN_DMAC -#define DMA_ID_DMAC7 DMA_LINK_OUT_DMAC - -/* handshakes */ -#define DMA_HANDSHAKE_DMIC_CH0 0 -#define DMA_HANDSHAKE_DMIC_CH1 1 -#define DMA_HANDSHAKE_SSP0_TX 2 -#define DMA_HANDSHAKE_SSP0_RX 3 -#define DMA_HANDSHAKE_SSP1_TX 4 -#define DMA_HANDSHAKE_SSP1_RX 5 -#define DMA_HANDSHAKE_SSP2_TX 6 -#define DMA_HANDSHAKE_SSP2_RX 7 -#define DMA_HANDSHAKE_SSP3_TX 8 -#define DMA_HANDSHAKE_SSP3_RX 9 -#define DMA_HANDSHAKE_SSP4_TX 10 -#define DMA_HANDSHAKE_SSP4_RX 11 -#define DMA_HANDSHAKE_SSP5_TX 12 -#define DMA_HANDSHAKE_SSP5_RX 13 - -#define dma_chan_irq(dma, chan) dma_irq(dma) -#define dma_chan_irq_name(dma, chan) dma_irq_name(dma) - -#endif /* __PLATFORM_LIB_DMA_H__ */ - -#else - -#error "This file shouldn't be included from outside of sof/lib/dma.h" - -#endif /* __SOF_LIB_DMA_H__ */