forked from thesofproject/sof
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpm.h
More file actions
79 lines (62 loc) · 1.8 KB
/
pm.h
File metadata and controls
79 lines (62 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright(c) 2018 Intel Corporation. All rights reserved.
*
* Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
* Keyon Jie <yang.jie@linux.intel.com>
*/
/**
* \file include/ipc/pm.h
* \brief IPC definitions
* \author Liam Girdwood <liam.r.girdwood@linux.intel.com>
* \author Keyon Jie <yang.jie@linux.intel.com>
*/
#ifndef __IPC_PM_H__
#define __IPC_PM_H__
#include <ipc/header.h>
#include <ipc/stream.h>
#include <stdint.h>
/*
* PM
*/
/* PM context element */
struct sof_ipc_pm_ctx_elem {
struct sof_ipc_hdr hdr;
uint32_t type;
uint32_t size;
uint64_t addr;
} __attribute__((packed, aligned(4)));
/*
* PM context - SOF_IPC_PM_CTX_SAVE, SOF_IPC_PM_CTX_RESTORE,
* SOF_IPC_PM_CTX_SIZE
*/
struct sof_ipc_pm_ctx {
struct sof_ipc_cmd_hdr hdr;
struct sof_ipc_host_buffer buffer;
uint32_t num_elems;
uint32_t size;
/* reserved for future use */
uint32_t reserved[8];
struct sof_ipc_pm_ctx_elem elems[];
} __attribute__((packed, aligned(4)));
/* enable or disable cores - SOF_IPC_PM_CORE_ENABLE */
struct sof_ipc_pm_core_config {
struct sof_ipc_cmd_hdr hdr;
uint32_t enable_mask;
} __attribute__((packed, aligned(4)));
struct sof_ipc_pm_gate {
struct sof_ipc_cmd_hdr hdr;
uint32_t flags;
/* reserved for future use */
uint32_t reserved[5];
} __attribute__((packed, aligned(4)));
#define SOF_PM_PG_RSVD BIT(0)
/** \brief Indicates whether streaming is active */
#define SOF_PM_PG_STREAMING BIT(1)
/** \brief Prevent power gating (0 - deep power state transitions allowed) */
#define SOF_PM_PPG BIT(2)
/** \brief Prevent clock gating (0 - cg allowed, 1 - DSP clock always on) */
#define SOF_PM_PCG BIT(3)
/** \brief Disable DMA tracing (0 - keep tracing, 1 - to disable DMA trace) */
#define SOF_PM_NO_TRACE BIT(4)
#endif /* __IPC_PM_H__ */