^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * This file is provided under a dual BSD/GPLv2 license. When using or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) * redistributing this file, you may do so under either license.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) * Copyright(c) 2018 Intel Corporation. All rights reserved.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) #ifndef __INCLUDE_SOUND_SOF_PM_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #define __INCLUDE_SOUND_SOF_PM_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #include <sound/sof/header.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) * PM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) /* PM context element */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) struct sof_ipc_pm_ctx_elem {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) struct sof_ipc_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) uint32_t type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) uint32_t size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) uint64_t addr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) * PM context - SOF_IPC_PM_CTX_SAVE, SOF_IPC_PM_CTX_RESTORE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) * SOF_IPC_PM_CTX_SIZE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) struct sof_ipc_pm_ctx {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) struct sof_ipc_cmd_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) struct sof_ipc_host_buffer buffer;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) uint32_t num_elems;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) uint32_t size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) /* reserved for future use */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) uint32_t reserved[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) struct sof_ipc_pm_ctx_elem elems[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) /* enable or disable cores - SOF_IPC_PM_CORE_ENABLE */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) struct sof_ipc_pm_core_config {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) struct sof_ipc_cmd_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) uint32_t enable_mask;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) struct sof_ipc_pm_gate {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) struct sof_ipc_cmd_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) uint32_t flags; /* platform specific */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) /* reserved for future use */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) uint32_t reserved[5];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) #endif