18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * This file is provided under a dual BSD/GPLv2 license.  When using or
48c2ecf20Sopenharmony_ci * redistributing this file, you may do so under either license.
58c2ecf20Sopenharmony_ci *
68c2ecf20Sopenharmony_ci * Copyright(c) 2018 Intel Corporation. All rights reserved.
78c2ecf20Sopenharmony_ci */
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci#ifndef __INCLUDE_SOUND_SOF_PM_H__
108c2ecf20Sopenharmony_ci#define __INCLUDE_SOUND_SOF_PM_H__
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci#include <sound/sof/header.h>
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci/*
158c2ecf20Sopenharmony_ci * PM
168c2ecf20Sopenharmony_ci */
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci/* PM context element */
198c2ecf20Sopenharmony_cistruct sof_ipc_pm_ctx_elem {
208c2ecf20Sopenharmony_ci	struct sof_ipc_hdr hdr;
218c2ecf20Sopenharmony_ci	uint32_t type;
228c2ecf20Sopenharmony_ci	uint32_t size;
238c2ecf20Sopenharmony_ci	uint64_t addr;
248c2ecf20Sopenharmony_ci}  __packed;
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci/*
278c2ecf20Sopenharmony_ci * PM context - SOF_IPC_PM_CTX_SAVE, SOF_IPC_PM_CTX_RESTORE,
288c2ecf20Sopenharmony_ci * SOF_IPC_PM_CTX_SIZE
298c2ecf20Sopenharmony_ci */
308c2ecf20Sopenharmony_cistruct sof_ipc_pm_ctx {
318c2ecf20Sopenharmony_ci	struct sof_ipc_cmd_hdr hdr;
328c2ecf20Sopenharmony_ci	struct sof_ipc_host_buffer buffer;
338c2ecf20Sopenharmony_ci	uint32_t num_elems;
348c2ecf20Sopenharmony_ci	uint32_t size;
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ci	/* reserved for future use */
378c2ecf20Sopenharmony_ci	uint32_t reserved[8];
388c2ecf20Sopenharmony_ci
398c2ecf20Sopenharmony_ci	struct sof_ipc_pm_ctx_elem elems[];
408c2ecf20Sopenharmony_ci} __packed;
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_ci/* enable or disable cores - SOF_IPC_PM_CORE_ENABLE */
438c2ecf20Sopenharmony_cistruct sof_ipc_pm_core_config {
448c2ecf20Sopenharmony_ci	struct sof_ipc_cmd_hdr hdr;
458c2ecf20Sopenharmony_ci	uint32_t enable_mask;
468c2ecf20Sopenharmony_ci} __packed;
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_cistruct sof_ipc_pm_gate {
498c2ecf20Sopenharmony_ci	struct sof_ipc_cmd_hdr hdr;
508c2ecf20Sopenharmony_ci	uint32_t flags;	/* platform specific */
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_ci	/* reserved for future use */
538c2ecf20Sopenharmony_ci	uint32_t reserved[5];
548c2ecf20Sopenharmony_ci} __packed;
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ci#endif
57