diff options
Diffstat (limited to 'drivers/gpu/nvgpu/pmuif/gpmuifboardobj.h')
-rw-r--r-- | drivers/gpu/nvgpu/pmuif/gpmuifboardobj.h | 195 |
1 files changed, 0 insertions, 195 deletions
diff --git a/drivers/gpu/nvgpu/pmuif/gpmuifboardobj.h b/drivers/gpu/nvgpu/pmuif/gpmuifboardobj.h deleted file mode 100644 index 8da31469..00000000 --- a/drivers/gpu/nvgpu/pmuif/gpmuifboardobj.h +++ /dev/null | |||
@@ -1,195 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2016-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 _GPMUIFBOARDOBJ_H_ | ||
14 | #define _GPMUIFBOARDOBJ_H_ | ||
15 | |||
16 | #include <nvgpu/flcnif_cmn.h> | ||
17 | #include "ctrl/ctrlboardobj.h" | ||
18 | |||
19 | /* | ||
20 | * Base structure describing a BOARDOBJ for communication between Kernel and | ||
21 | * PMU. | ||
22 | */ | ||
23 | struct nv_pmu_boardobj { | ||
24 | u8 type; | ||
25 | }; | ||
26 | |||
27 | /* | ||
28 | * Base structure describing a BOARDOBJ for Query interface between Kernel and | ||
29 | * PMU. | ||
30 | */ | ||
31 | struct nv_pmu_boardobj_query { | ||
32 | u8 type; | ||
33 | }; | ||
34 | |||
35 | /* | ||
36 | * Virtual base structure describing a BOARDOBJGRP interface between Kernel and | ||
37 | * PMU. | ||
38 | */ | ||
39 | struct nv_pmu_boardobjgrp_super { | ||
40 | u8 type; | ||
41 | u8 class_id; | ||
42 | u8 obj_slots; | ||
43 | u8 rsvd; | ||
44 | }; | ||
45 | |||
46 | struct nv_pmu_boardobjgrp { | ||
47 | struct nv_pmu_boardobjgrp_super super; | ||
48 | u32 obj_mask; | ||
49 | }; | ||
50 | |||
51 | struct nv_pmu_boardobjgrp_e32 { | ||
52 | struct nv_pmu_boardobjgrp_super super; | ||
53 | struct ctrl_boardobjgrp_mask_e32 obj_mask; | ||
54 | }; | ||
55 | |||
56 | struct nv_pmu_boardobjgrp_e255 { | ||
57 | struct nv_pmu_boardobjgrp_super super; | ||
58 | struct ctrl_boardobjgrp_mask_e255 obj_mask; | ||
59 | }; | ||
60 | |||
61 | struct nv_pmu_boardobj_cmd_grp_payload { | ||
62 | struct pmu_allocation_v3 dmem_buf; | ||
63 | struct flcn_mem_desc_v0 fb; | ||
64 | u8 hdr_size; | ||
65 | u8 entry_size; | ||
66 | }; | ||
67 | |||
68 | struct nv_pmu_boardobj_cmd_grp { | ||
69 | u8 cmd_type; | ||
70 | u8 pad[2]; | ||
71 | u8 class_id; | ||
72 | struct nv_pmu_boardobj_cmd_grp_payload grp; | ||
73 | }; | ||
74 | |||
75 | #define NV_PMU_BOARDOBJ_GRP_ALLOC_OFFSET \ | ||
76 | (NV_OFFSETOF(NV_PMU_BOARDOBJ_CMD_GRP, grp)) | ||
77 | |||
78 | struct nv_pmu_boardobj_cmd { | ||
79 | union { | ||
80 | u8 cmd_type; | ||
81 | struct nv_pmu_boardobj_cmd_grp grp; | ||
82 | struct nv_pmu_boardobj_cmd_grp grp_set; | ||
83 | struct nv_pmu_boardobj_cmd_grp grp_get_status; | ||
84 | }; | ||
85 | }; | ||
86 | |||
87 | struct nv_pmu_boardobj_msg_grp { | ||
88 | u8 msg_type; | ||
89 | bool b_success; | ||
90 | flcn_status flcn_status; | ||
91 | u8 class_id; | ||
92 | }; | ||
93 | |||
94 | struct nv_pmu_boardobj_msg { | ||
95 | union { | ||
96 | u8 msg_type; | ||
97 | struct nv_pmu_boardobj_msg_grp grp; | ||
98 | struct nv_pmu_boardobj_msg_grp grp_set; | ||
99 | struct nv_pmu_boardobj_msg_grp grp_get_status; | ||
100 | }; | ||
101 | }; | ||
102 | |||
103 | /* | ||
104 | * Macro generating structures describing classes which implement | ||
105 | * NV_PMU_BOARDOBJGRP via the NV_PMU_BOARDBOBJ_CMD_GRP SET interface. | ||
106 | * | ||
107 | * @para _eng Name of implementing engine in which this structure is | ||
108 | * found. | ||
109 | * @param _class Class ID of Objects within Board Object Group. | ||
110 | * @param _slots Max number of elements this group can contain. | ||
111 | */ | ||
112 | #define NV_PMU_BOARDOBJ_GRP_SET_MAKE(_eng, _class, _slots) \ | ||
113 | NV_PMU_MAKE_ALIGNED_STRUCT( \ | ||
114 | nv_pmu_##_eng##_##_class##_boardobjgrp_set_header, one_structure); \ | ||
115 | NV_PMU_MAKE_ALIGNED_UNION( \ | ||
116 | nv_pmu_##_eng##_##_class##_boardobj_set_union, one_union); \ | ||
117 | struct nv_pmu_##_eng##_##_class##_boardobj_grp_set { \ | ||
118 | union nv_pmu_##_eng##_##_class##_boardobjgrp_set_header_aligned hdr; \ | ||
119 | union nv_pmu_##_eng##_##_class##_boardobj_set_union_aligned objects[(_slots)];\ | ||
120 | } | ||
121 | |||
122 | /* | ||
123 | * Macro generating structures describing classes which implement | ||
124 | * NV_PMU_BOARDOBJGRP_E32 via the NV_PMU_BOARDBOBJ_CMD_GRP SET interface. | ||
125 | * | ||
126 | * @para _eng Name of implementing engine in which this structure is | ||
127 | * found. | ||
128 | * @param _class Class ID of Objects within Board Object Group. | ||
129 | */ | ||
130 | #define NV_PMU_BOARDOBJ_GRP_SET_MAKE_E32(_eng, _class) \ | ||
131 | NV_PMU_BOARDOBJ_GRP_SET_MAKE(_eng, _class, \ | ||
132 | CTRL_BOARDOBJGRP_E32_MAX_OBJECTS) | ||
133 | |||
134 | /* | ||
135 | * Macro generating structures describing classes which implement | ||
136 | * NV_PMU_BOARDOBJGRP_E255 via the NV_PMU_BOARDBOBJ_CMD_GRP SET interface. | ||
137 | * | ||
138 | * @para _eng Name of implementing engine in which this structure is | ||
139 | * found. | ||
140 | * @param _class Class ID of Objects within Board Object Group. | ||
141 | */ | ||
142 | #define NV_PMU_BOARDOBJ_GRP_SET_MAKE_E255(_eng, _class) \ | ||
143 | NV_PMU_BOARDOBJ_GRP_SET_MAKE(_eng, _class, \ | ||
144 | CTRL_BOARDOBJGRP_E255_MAX_OBJECTS) | ||
145 | |||
146 | /* | ||
147 | * Macro generating structures for querying dynamic state for classes which | ||
148 | * implement NV_PMU_BOARDOBJGRP via the NV_PMU_BOARDOBJ_CMD_GRP GET_STATUS | ||
149 | * interface. | ||
150 | * | ||
151 | * @para _eng Name of implementing engine in which this structure is | ||
152 | * found. | ||
153 | * @param _class Class ID of Objects within Board Object Group. | ||
154 | * @param _slots Max number of elements this group can contain. | ||
155 | */ | ||
156 | #define NV_PMU_BOARDOBJ_GRP_GET_STATUS_MAKE(_eng, _class, _slots) \ | ||
157 | NV_PMU_MAKE_ALIGNED_STRUCT( \ | ||
158 | nv_pmu_##_eng##_##_class##_boardobjgrp_get_status_header, struct); \ | ||
159 | NV_PMU_MAKE_ALIGNED_UNION( \ | ||
160 | nv_pmu_##_eng##_##_class##_boardobj_get_status_union, union); \ | ||
161 | struct nv_pmu_##_eng##_##_class##_boardobj_grp_get_status { \ | ||
162 | union nv_pmu_##_eng##_##_class##_boardobjgrp_get_status_header_aligned \ | ||
163 | hdr; \ | ||
164 | union nv_pmu_##_eng##_##_class##_boardobj_get_status_union_aligned \ | ||
165 | objects[(_slots)]; \ | ||
166 | } | ||
167 | |||
168 | /* | ||
169 | * Macro generating structures for querying dynamic state for classes which | ||
170 | * implement NV_PMU_BOARDOBJGRP_E32 via the NV_PMU_BOARDOBJ_CMD_GRP GET_STATUS | ||
171 | * interface. | ||
172 | * | ||
173 | * @para _eng Name of implementing engine in which this structure is | ||
174 | * found. | ||
175 | * @param _class Class ID of Objects within Board Object Group. | ||
176 | */ | ||
177 | #define NV_PMU_BOARDOBJ_GRP_GET_STATUS_MAKE_E32(_eng, _class) \ | ||
178 | NV_PMU_BOARDOBJ_GRP_GET_STATUS_MAKE(_eng, _class, \ | ||
179 | CTRL_BOARDOBJGRP_E32_MAX_OBJECTS) | ||
180 | |||
181 | /* | ||
182 | * Macro generating structures for querying dynamic state for classes which | ||
183 | * implement NV_PMU_BOARDOBJGRP_E255 via the NV_PMU_BOARDOBJ_CMD_GRP GET_STATUS | ||
184 | * interface. | ||
185 | * | ||
186 | * @para _eng Name of implementing engine in which this structure is | ||
187 | * found. | ||
188 | * @param _class Class ID of Objects within Board Object Group. | ||
189 | */ | ||
190 | #define NV_PMU_BOARDOBJ_GRP_GET_STATUS_MAKE_E255(_eng, _class) \ | ||
191 | NV_PMU_BOARDOBJ_GRP_GET_STATUS_MAKE(_eng, _class, \ | ||
192 | CTRL_BOARDOBJGRP_E255_MAX_OBJECTS) | ||
193 | |||
194 | |||
195 | #endif /* _GPMUIFBOARDOBJ_H_ */ | ||