summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/pmuif/gpmuif_acr.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/pmuif/gpmuif_acr.h')
-rw-r--r--drivers/gpu/nvgpu/pmuif/gpmuif_acr.h104
1 files changed, 104 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/pmuif/gpmuif_acr.h b/drivers/gpu/nvgpu/pmuif/gpmuif_acr.h
new file mode 100644
index 00000000..440ffbaa
--- /dev/null
+++ b/drivers/gpu/nvgpu/pmuif/gpmuif_acr.h
@@ -0,0 +1,104 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 */
13#ifndef _GPMUIFACR_H_
14#define _GPMUIFACR_H_
15
16/* ACR Commands/Message structures */
17
18enum {
19 PMU_ACR_CMD_ID_INIT_WPR_REGION = 0x0,
20 PMU_ACR_CMD_ID_BOOTSTRAP_FALCON,
21 PMU_ACR_CMD_ID_RESERVED,
22 PMU_ACR_CMD_ID_BOOTSTRAP_MULTIPLE_FALCONS,
23};
24
25/*
26 * Initializes the WPR region details
27 */
28struct pmu_acr_cmd_init_wpr_details {
29 u8 cmd_type;
30 u32 regionid;
31 u32 wproffset;
32
33};
34
35/*
36 * falcon ID to bootstrap
37 */
38struct pmu_acr_cmd_bootstrap_falcon {
39 u8 cmd_type;
40 u32 flags;
41 u32 falconid;
42};
43
44/*
45 * falcon ID to bootstrap
46 */
47struct pmu_acr_cmd_bootstrap_multiple_falcons {
48 u8 cmd_type;
49 u32 flags;
50 u32 falconidmask;
51 u32 usevamask;
52 struct falc_u64 wprvirtualbase;
53};
54
55#define PMU_ACR_CMD_BOOTSTRAP_FALCON_FLAGS_RESET_NO 1
56#define PMU_ACR_CMD_BOOTSTRAP_FALCON_FLAGS_RESET_YES 0
57
58
59struct pmu_acr_cmd {
60 union {
61 u8 cmd_type;
62 struct pmu_acr_cmd_bootstrap_falcon bootstrap_falcon;
63 struct pmu_acr_cmd_init_wpr_details init_wpr;
64 struct pmu_acr_cmd_bootstrap_multiple_falcons boot_falcons;
65 };
66};
67
68/* acr messages */
69
70/*
71 * returns the WPR region init information
72 */
73#define PMU_ACR_MSG_ID_INIT_WPR_REGION 0
74
75/*
76 * Returns the Bootstrapped falcon ID to RM
77 */
78#define PMU_ACR_MSG_ID_BOOTSTRAP_FALCON 1
79
80/*
81 * Returns the WPR init status
82 */
83#define PMU_ACR_SUCCESS 0
84#define PMU_ACR_ERROR 1
85
86/*
87 * PMU notifies about bootstrap status of falcon
88 */
89struct pmu_acr_msg_bootstrap_falcon {
90 u8 msg_type;
91 union {
92 u32 errorcode;
93 u32 falconid;
94 };
95};
96
97struct pmu_acr_msg {
98 union {
99 u8 msg_type;
100 struct pmu_acr_msg_bootstrap_falcon acrmsg;
101 };
102};
103
104#endif /* _GPMUIFACR_H_ */