Skip to content

Commit

Permalink
hda: separation of l1 settings to new function
Browse files Browse the repository at this point in the history
Separating two new functions force and allow l1
to have the current state with separated functions
in the ipc file so that SOF can call these
functions via IPC DMI_FORCE_L1_EXIT. Change related
to the addition of a new parameter to force
DMI L1 exit on IPC request.

Signed-off-by: Fabiola Kwasowiec <[email protected]>
  • Loading branch information
fkwasowi authored and carlescufi committed Dec 13, 2023
1 parent 8cb4f09 commit 431da79
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/dma/dma_intel_adsp_hda.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,7 @@ int intel_adsp_hda_dma_host_reload(const struct device *dev, uint32_t channel,
__ASSERT(channel < cfg->dma_channels, "Channel does not exist");

#if CONFIG_DMA_INTEL_ADSP_HDA_TIMING_L1_EXIT
#if CONFIG_SOC_SERIES_INTEL_ACE
ACE_DfPMCCH.svcfg |= ADSP_FORCE_DECOUPLED_HDMA_L1_EXIT_BIT;
#endif
intel_adsp_force_dmi_l0_state();
switch (cfg->direction) {
case HOST_TO_MEMORY:
; /* Only statements can be labeled in C, a declaration is not valid */
Expand Down Expand Up @@ -458,9 +456,7 @@ void intel_adsp_hda_dma_isr(void)
}

if (clear_l1_exit) {
#if CONFIG_SOC_SERIES_INTEL_ACE
ACE_DfPMCCH.svcfg &= ~(ADSP_FORCE_DECOUPLED_HDMA_L1_EXIT_BIT);
#endif
intel_adsp_allow_dmi_l1_state();
}
#endif
}
15 changes: 15 additions & 0 deletions soc/xtensa/intel_adsp/common/include/intel_adsp_hda.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <zephyr/device.h>
#include <adsp_shim.h>
#include <adsp_memory.h>
#include <adsp_shim.h>

/**
* @brief HDA stream functionality for Intel ADSP
Expand Down Expand Up @@ -441,6 +442,20 @@ static inline void intel_adsp_hda_disable_buffer_interrupt(uint32_t base, uint32
*DGCS(base, regblock_size, sid) &= ~DGCS_BSCIE;
}

static inline void intel_adsp_force_dmi_l0_state(void)
{
#ifdef CONFIG_SOC_SERIES_INTEL_ACE
ACE_DfPMCCH.svcfg |= ADSP_FORCE_DECOUPLED_HDMA_L1_EXIT_BIT;
#endif
}

static inline void intel_adsp_allow_dmi_l1_state(void)
{
#ifdef CONFIG_SOC_SERIES_INTEL_ACE
ACE_DfPMCCH.svcfg &= ~(ADSP_FORCE_DECOUPLED_HDMA_L1_EXIT_BIT);
#endif
}

/**
* @brief Clear BSC interrupt
*
Expand Down

0 comments on commit 431da79

Please sign in to comment.