From 180f50feda2514b792d2588f58907856e0de1461 Mon Sep 17 00:00:00 2001 From: Flavio Ceolin Date: Wed, 24 Aug 2022 19:30:42 +0000 Subject: [PATCH] intel_adsp: gpdma: Fix driver initialiaziation cavs15 does not need to request ownership of the dma controller. Fixes #49203 Signed-off-by: Flavio Ceolin --- drivers/dma/Kconfig.intel_adsp_gpdma | 7 +++++++ drivers/dma/dma_intel_adsp_gpdma.c | 2 ++ 2 files changed, 9 insertions(+) diff --git a/drivers/dma/Kconfig.intel_adsp_gpdma b/drivers/dma/Kconfig.intel_adsp_gpdma index b17011a217894d..a34ed1ad3ae417 100644 --- a/drivers/dma/Kconfig.intel_adsp_gpdma +++ b/drivers/dma/Kconfig.intel_adsp_gpdma @@ -10,6 +10,13 @@ config DMA_INTEL_ADSP_GPDMA if DMA_INTEL_ADSP_GPDMA +config DMA_INTEL_ADSP_GPDMA_NEED_CONTROLLER_OWNERSHIP + bool + default y if !SOC_INTEL_CAVS_V15 + help + Hidden option to indicate that the driver needs to request + dma controller ownership from the host. + config DMA_INTEL_ADSP_GPDMA_HAS_LLP bool "Intel ADSP GPDMA Linear Link Position Feature" default y if SOC_SERIES_INTEL_ACE1X diff --git a/drivers/dma/dma_intel_adsp_gpdma.c b/drivers/dma/dma_intel_adsp_gpdma.c index 144fb313b5a6de..fd19c5aa7111f8 100644 --- a/drivers/dma/dma_intel_adsp_gpdma.c +++ b/drivers/dma/dma_intel_adsp_gpdma.c @@ -238,8 +238,10 @@ int intel_adsp_gpdma_init(const struct device *dev) } #endif +#ifdef CONFIG_DMA_INTEL_ADSP_GPDMA_NEED_CONTROLLER_OWNERSHIP sys_write32(LPGPDMA_CHOSEL_FLAG | LPGPDMA_CTLOSEL_FLAG, DSP_INIT_LPGPDMA(0)); sys_write32(LPGPDMA_CHOSEL_FLAG | LPGPDMA_CTLOSEL_FLAG, DSP_INIT_LPGPDMA(1)); +#endif /* Disable dynamic clock gating appropriately before initializing */ intel_adsp_gpdma_clock_enable(dev);