From 4f3ff599c5139a6d16ce8eff7e0ba9198cb8d2e1 Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Thu, 19 Sep 2024 15:48:30 +0300 Subject: [PATCH] platform: intel: remove pm_runtime.h Platform implementation no longer mandatory for SOF Zephyr builds, so the pm_runtime.h file can be removed for these platforms. Signed-off-by: Kai Vehmanen --- .../intel/cavs/include/cavs/lib/pm_runtime.h | 97 ------------------- .../include/platform/lib/pm_runtime.h | 72 -------------- .../include/platform/lib/pm_runtime.h | 70 ------------- .../include/platform/lib/pm_runtime.h | 72 -------------- .../include/platform/lib/pm_runtime.h | 27 ------ 5 files changed, 338 deletions(-) delete mode 100644 src/platform/intel/cavs/include/cavs/lib/pm_runtime.h delete mode 100644 src/platform/lunarlake/include/platform/lib/pm_runtime.h delete mode 100644 src/platform/meteorlake/include/platform/lib/pm_runtime.h delete mode 100644 src/platform/pantherlake/include/platform/lib/pm_runtime.h delete mode 100644 src/platform/tigerlake/include/platform/lib/pm_runtime.h diff --git a/src/platform/intel/cavs/include/cavs/lib/pm_runtime.h b/src/platform/intel/cavs/include/cavs/lib/pm_runtime.h deleted file mode 100644 index 9b91c544fd58..000000000000 --- a/src/platform/intel/cavs/include/cavs/lib/pm_runtime.h +++ /dev/null @@ -1,97 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * - * Copyright(c) 2019 Intel Corporation. All rights reserved. - * - * Author: Tomasz Lauda - */ - -/** - * \file cavs/lib/pm_runtime.h - * \brief Runtime power management header file for cAVS platforms - * \author Tomasz Lauda - */ - -#ifdef __PLATFORM_LIB_PM_RUNTIME_H__ - -#ifndef __CAVS_LIB_PM_RUNTIME_H__ -#define __CAVS_LIB_PM_RUNTIME_H__ - -#include - -/** - * \brief extra pwr flag to power up a core with a specific reason - * it can be powered down only with the same reason (flag) - */ -#define PWRD_MASK MASK(31, 30) -#define PWRD_BY_HPRO BIT(31) /**< requested by HPRO */ -#define PWRD_BY_TPLG BIT(30) /**< typical power up */ - -struct pm_runtime_data; - -/** \brief cAVS specific runtime power management data. */ -struct cavs_pm_runtime_data { - bool dsp_d0; /**< dsp target D0(true) or D0ix(false) */ - int host_dma_l1_sref; /**< ref counter for Host DMA accesses */ - uint32_t sleep_core_mask; /**< represents cores in waiti state */ - uint32_t prepare_d0ix_core_mask; /**< indicates whether core needs */ - /**< to prepare to d0ix power down */ - /**< before next waiti */ - int dsp_client_bitmap[CONFIG_CORE_COUNT]; /**< simple pwr override */ -}; - -/** - * \brief Initializes platform specific runtime power management. - * \param[in,out] prd Runtime power management data. - */ -void platform_pm_runtime_init(struct pm_runtime_data *prd); - -/** - * \brief Retrieves platform specific power management resource. - * - * \param[in] context Type of power management context. - * \param[in] index Index of the device. - * \param[in] flags Flags, set of RPM_... - */ -void platform_pm_runtime_get(uint32_t context, uint32_t index, uint32_t flags); - -/** - * \brief Releases platform specific power management resource. - * - * \param[in] context Type of power management context. - * \param[in] index Index of the device. - * \param[in] flags Flags, set of RPM_... - */ -void platform_pm_runtime_put(uint32_t context, uint32_t index, uint32_t flags); - -void platform_pm_runtime_enable(uint32_t context, uint32_t index); - -void platform_pm_runtime_disable(uint32_t context, uint32_t index); - -void platform_pm_runtime_prepare_d0ix_en(uint32_t index); - -void platform_pm_runtime_prepare_d0ix_dis(uint32_t index); - -int platform_pm_runtime_prepare_d0ix_is_req(uint32_t index); - -bool platform_pm_runtime_is_active(uint32_t context, uint32_t index); - -/** - * \brief Power gates platform specific hardware resources. - */ -void platform_pm_runtime_power_off(void); - -/** - * \brief CAVS DSP residency counters - * R0 - HPRO clock, highest power consumption state - * R1 - LPRO clock, low power consumption state - * R2 - LPS, lowest power consumption state - * with extra priority to R2 (LPS) which cannot be interrupted by R0/R1 changes - */ - -#endif - -#else - -#error "Do not include outside of platform/lib/pm_runtime.h" - -#endif diff --git a/src/platform/lunarlake/include/platform/lib/pm_runtime.h b/src/platform/lunarlake/include/platform/lib/pm_runtime.h deleted file mode 100644 index a5d16dc40f78..000000000000 --- a/src/platform/lunarlake/include/platform/lib/pm_runtime.h +++ /dev/null @@ -1,72 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * - * Copyright(c) 2023 Intel Corporation. All rights reserved. - * - * Author: Tomasz Lauda - */ - -/** - * \file platform/lunarlake/include/platform/lib/pm_runtime.h - * \brief Runtime power management header file for Tigerlake - * \author Tomasz Lauda - */ - -#ifdef __SOF_LIB_PM_RUNTIME_H__ - -#ifndef __PLATFORM_LIB_PM_RUNTIME_H__ -#define __PLATFORM_LIB_PM_RUNTIME_H__ - -#include -#include - -/** - * \brief extra pwr flag to power up a core with a specific reason - * it can be powered down only with the same reason (flag) - */ -#define PWRD_MASK MASK(31, 30) -#define PWRD_BY_HPRO BIT(31) /**< requested by HPRO */ -#define PWRD_BY_TPLG BIT(30) /**< typical power up */ - -struct pm_runtime_data; - -/** - * \brief Initializes platform specific runtime power management. - * \param[in,out] prd Runtime power management data. - */ -void platform_pm_runtime_init(struct pm_runtime_data *prd); - -/** - * \brief Retrieves platform specific power management resource. - * - * \param[in] context - Type of power management context. - * \param[in] index - index of the device. - * \param[in] flags - Flags, set of RPM_... - */ -void platform_pm_runtime_get(uint32_t context, uint32_t index, uint32_t flags); - -/** - * \brief Releases platform specific power management resource. - * - * \param[in] context - Type of power management context. - * \param[in] index - Index of the device. - * \param[in] flags - Flags, set of RPM_... - */ -void platform_pm_runtime_put(uint32_t context, uint32_t index, uint32_t flags); - -void platform_pm_runtime_prepare_d0ix_en(uint32_t index); - -void platform_pm_runtime_enable(uint32_t context, uint32_t index); - -void platform_pm_runtime_disable(uint32_t context, uint32_t index); - -bool platform_pm_runtime_is_active(uint32_t context, uint32_t index); - -void platform_pm_runtime_power_off(void); - -#endif /* __PLATFORM_LIB_PM_RUNTIME_H__ */ - -#else - -#error "This file shouldn't be included from outside of sof/lib/pm_runtime.h" - -#endif /* __SOF_LIB_PM_RUNTIME_H__ */ diff --git a/src/platform/meteorlake/include/platform/lib/pm_runtime.h b/src/platform/meteorlake/include/platform/lib/pm_runtime.h deleted file mode 100644 index bbf7c018e904..000000000000 --- a/src/platform/meteorlake/include/platform/lib/pm_runtime.h +++ /dev/null @@ -1,70 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * - * Copyright(c) 2022 Intel Corporation. All rights reserved. - * - * Author: Tomasz Lauda - */ - -/** - * \file platform/tigerlake/include/platform/lib/pm_runtime.h - * \brief Runtime power management header file for Tigerlake - * \author Tomasz Lauda - */ - -#ifdef __SOF_LIB_PM_RUNTIME_H__ - -#ifndef __PLATFORM_LIB_PM_RUNTIME_H__ -#define __PLATFORM_LIB_PM_RUNTIME_H__ - -#include -#include - -/** - * \brief extra pwr flag to power up a core with a specific reason - * it can be powered down only with the same reason (flag) - */ -#define PWRD_MASK MASK(31, 30) -#define PWRD_BY_HPRO BIT(31) /**< requested by HPRO */ -#define PWRD_BY_TPLG BIT(30) /**< typical power up */ - -struct pm_runtime_data; - -/** - * \brief Initializes platform specific runtime power management. - * \param[in,out] prd Runtime power management data. - */ -void platform_pm_runtime_init(struct pm_runtime_data *prd); - -/** - * \brief Retrieves platform specific power management resource. - * - * \param[in] context Type of power management context. - * \param[in] index Index of the device. - * \param[in] flags Flags, set of RPM_... - */ -void platform_pm_runtime_get(uint32_t context, uint32_t index, uint32_t flags); - -/** - * \brief Releases platform specific power management resource. - * - * \param[in] context Type of power management context. - * \param[in] index Index of the device. - * \param[in] flags Flags, set of RPM_... - */ -void platform_pm_runtime_put(uint32_t context, uint32_t index, uint32_t flags); - -void platform_pm_runtime_prepare_d0ix_en(uint32_t index); - -void platform_pm_runtime_enable(uint32_t context, uint32_t index); - -void platform_pm_runtime_disable(uint32_t context, uint32_t index); - -bool platform_pm_runtime_is_active(uint32_t context, uint32_t index); - -#endif /* __PLATFORM_LIB_PM_RUNTIME_H__ */ - -#else - -#error "This file shouldn't be included from outside of sof/lib/pm_runtime.h" - -#endif /* __SOF_LIB_PM_RUNTIME_H__ */ diff --git a/src/platform/pantherlake/include/platform/lib/pm_runtime.h b/src/platform/pantherlake/include/platform/lib/pm_runtime.h deleted file mode 100644 index edb1ebdeee49..000000000000 --- a/src/platform/pantherlake/include/platform/lib/pm_runtime.h +++ /dev/null @@ -1,72 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * - * Copyright(c) 2022-2024 Intel Corporation. - * - * Author: Tomasz Lauda - */ - -/** - * \file platform/pantherlake/include/platform/lib/pm_runtime.h - * \brief Runtime power management header file for Tigerlake - * \author Tomasz Lauda - */ - -#ifdef __SOF_LIB_PM_RUNTIME_H__ - -#ifndef __PLATFORM_LIB_PM_RUNTIME_H__ -#define __PLATFORM_LIB_PM_RUNTIME_H__ - -#include -#include - -/** - * \brief extra pwr flag to power up a core with a specific reason - * it can be powered down only with the same reason (flag) - */ -#define PWRD_MASK MASK(31, 30) -#define PWRD_BY_HPRO BIT(31) /**< requested by HPRO */ -#define PWRD_BY_TPLG BIT(30) /**< typical power up */ - -struct pm_runtime_data; - -/** - * \brief Initializes platform specific runtime power management. - * \param[in,out] prd Runtime power management data. - */ -void platform_pm_runtime_init(struct pm_runtime_data *prd); - -/** - * \brief Retrieves platform specific power management resource. - * - * \param[in] context Type of power management context. - * \param[in] index of the device. - * \param[in] flags, set of RPM_... - */ -void platform_pm_runtime_get(uint32_t context, uint32_t index, uint32_t flags); - -/** - * \brief Releases platform specific power management resource. - * - * \param[in] context Type of power management context. - * \param[in] index of the device. - * \param[in] flags, set of RPM_... - */ -void platform_pm_runtime_put(uint32_t context, uint32_t index, uint32_t flags); - -void platform_pm_runtime_prepare_d0ix_en(uint32_t index); - -void platform_pm_runtime_enable(uint32_t context, uint32_t index); - -void platform_pm_runtime_disable(uint32_t context, uint32_t index); - -bool platform_pm_runtime_is_active(uint32_t context, uint32_t index); - -void platform_pm_runtime_power_off(void); - -#endif /* __PLATFORM_LIB_PM_RUNTIME_H__ */ - -#else - -#error "This file shouldn't be included from outside of sof/lib/pm_runtime.h" - -#endif /* __SOF_LIB_PM_RUNTIME_H__ */ diff --git a/src/platform/tigerlake/include/platform/lib/pm_runtime.h b/src/platform/tigerlake/include/platform/lib/pm_runtime.h deleted file mode 100644 index fbc670e5baec..000000000000 --- a/src/platform/tigerlake/include/platform/lib/pm_runtime.h +++ /dev/null @@ -1,27 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * - * Copyright(c) 2018 Intel Corporation. All rights reserved. - * - * Author: Tomasz Lauda - */ - -/** - * \file platform/tigerlake/include/platform/lib/pm_runtime.h - * \brief Runtime power management header file for Tigerlake - * \author Tomasz Lauda - */ - -#ifdef __SOF_LIB_PM_RUNTIME_H__ - -#ifndef __PLATFORM_LIB_PM_RUNTIME_H__ -#define __PLATFORM_LIB_PM_RUNTIME_H__ - -#include - -#endif /* __PLATFORM_LIB_PM_RUNTIME_H__ */ - -#else - -#error "This file shouldn't be included from outside of sof/lib/pm_runtime.h" - -#endif /* __SOF_LIB_PM_RUNTIME_H__ */