Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/include/sof/lib/pm_runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

/** \brief Runtime power management context */
enum pm_runtime_context {
PM_RUNTIME_HOST_DMA_L1 = 0, /**< Host DMA L1 Exit */
PM_RUNTIME_HOST_DMA_L1 = 0, /**< Host DMA L1 */
SSP_CLK, /**< SSP Clock */
SSP_POW, /**< SSP Power */
DMIC_CLK, /**< DMIC Clock */
Expand Down
16 changes: 10 additions & 6 deletions src/platform/intel/cavs/lib/pm_runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,11 @@ DECLARE_SOF_UUID("power", power_uuid, 0x76cc9773, 0x440c, 0x4df9,

DECLARE_TR_CTX(power_tr, SOF_UUID(power_uuid), LOG_LEVEL_INFO);

/** \brief Registers Host DMA access by incrementing ref counter. */
static void cavs_pm_runtime_host_dma_l1_entry(void)
/**
* \brief Registers Host DMA usage that should not trigger
* transition to L0 via forced L1 exit.
*/
static void cavs_pm_runtime_host_dma_l1_get(void)
{
struct pm_runtime_data *prd = pm_runtime_data_get();
struct cavs_pm_runtime_data *pprd = prd->platform_data;
Expand All @@ -61,9 +64,10 @@ static void cavs_pm_runtime_host_dma_l1_entry(void)
}

/**
* \brief Forces Host DMAs to exit L1.
* \brief Releases Host DMA usage preventing L1 exit. If this
* the last user, forced L1 exit is performed.
*/
static inline void cavs_pm_runtime_force_host_dma_l1_exit(void)
static inline void cavs_pm_runtime_host_dma_l1_put(void)
{
struct pm_runtime_data *prd = pm_runtime_data_get();
struct cavs_pm_runtime_data *pprd = prd->platform_data;
Expand Down Expand Up @@ -477,7 +481,7 @@ void platform_pm_runtime_get(enum pm_runtime_context context, uint32_t index,
/* Action based on context */
switch (context) {
case PM_RUNTIME_HOST_DMA_L1:
cavs_pm_runtime_host_dma_l1_entry();
cavs_pm_runtime_host_dma_l1_get();
break;
#if CONFIG_INTEL_SSP
case SSP_CLK:
Expand Down Expand Up @@ -517,7 +521,7 @@ void platform_pm_runtime_put(enum pm_runtime_context context, uint32_t index,
{
switch (context) {
case PM_RUNTIME_HOST_DMA_L1:
cavs_pm_runtime_force_host_dma_l1_exit();
cavs_pm_runtime_host_dma_l1_put();
break;
#if CONFIG_INTEL_SSP
case SSP_CLK:
Expand Down