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