1 /* SPDX-License-Identifier: BSD-3-Clause 2 * 3 * Copyright(c) 2019 Intel Corporation. All rights reserved. 4 * 5 * Author: Tomasz Lauda <tomasz.lauda@linux.intel.com> 6 */ 7 8 /** 9 * \file cavs/lib/pm_runtime.h 10 * \brief Runtime power management header file for cAVS platforms 11 * \author Tomasz Lauda <tomasz.lauda@linux.intel.com> 12 */ 13 14 #ifdef __PLATFORM_LIB_PM_RUNTIME_H__ 15 16 #ifndef __CAVS_LIB_PM_RUNTIME_H__ 17 #define __CAVS_LIB_PM_RUNTIME_H__ 18 19 /** 20 * \brief extra pwr flag to power up a core with a specific reason 21 * it can be powered down only with the same reason (flag) 22 */ 23 #define PWRD_MASK MASK(31, 30) 24 #define PWRD_BY_HPRO BIT(31) /**< requested by HPRO */ 25 #define PWRD_BY_TPLG BIT(30) /**< typical power up */ 26 27 struct pm_runtime_data; 28 29 /** \brief cAVS specific runtime power management data. */ 30 struct cavs_pm_runtime_data { 31 bool dsp_d0; /**< dsp target D0(true) or D0ix(false) */ 32 int host_dma_l1_sref; /**< ref counter for Host DMA accesses */ 33 uint32_t sleep_core_mask; /**< represents cores in waiti state */ 34 int dsp_client_bitmap[CONFIG_CORE_COUNT]; /**< simple pwr override */ 35 }; 36 37 /** 38 * \brief CAVS DSP residency counters 39 * R0 - HPRO clock, highest power consumption state 40 * R1 - LPRO clock, low power consumption state 41 * R2 - LPS, lowest power consumption state 42 * with extra priority to R2 (LPS) which cannot be interrupted by R0/R1 changes 43 */ 44 45 #endif 46 47 #else 48 49 #error "Do not include outside of platform/lib/pm_runtime.h" 50 51 #endif 52