diff options
author | Timo Alho <talho@nvidia.com> | 2018-10-22 09:19:39 -0400 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2018-11-08 06:49:26 -0500 |
commit | 4bef358c9071748aa3e55f70f3ba5abc6363fcfe (patch) | |
tree | 5ab05d9136bcafaab54a30bd6fb155c97cf4c0fa /include/soc | |
parent | 2b86c11b99d3fc4e82af65c5b00b4334a6dfe6c9 (diff) |
soc/tegra: bpmp: Update ABI header
Update the firmware header file to a more recent version. The major
changes in the new version are:
* add a new MRQ for firmware version query ABI and deprecates the old
* add ABI to query Tegra194 CPU frequency limits
* add ABI to control subset of PCIE UPHY state
The new header contains also some editorial changes to the
documentation.
Signed-off-by: Timo Alho <talho@nvidia.com>
Acked-by: Sivaram Nair <sivaramn@nvidia.com>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'include/soc')
-rw-r--r-- | include/soc/tegra/bpmp-abi.h | 1188 |
1 files changed, 947 insertions, 241 deletions
diff --git a/include/soc/tegra/bpmp-abi.h b/include/soc/tegra/bpmp-abi.h index 98d8d38b99a1..ab7f8796a260 100644 --- a/include/soc/tegra/bpmp-abi.h +++ b/include/soc/tegra/bpmp-abi.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 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, | 5 | * under the terms and conditions of the GNU General Public License, |
@@ -40,7 +40,6 @@ | |||
40 | * @file | 40 | * @file |
41 | */ | 41 | */ |
42 | 42 | ||
43 | |||
44 | /** | 43 | /** |
45 | * @defgroup MRQ MRQ Messages | 44 | * @defgroup MRQ MRQ Messages |
46 | * @brief Messages sent to/from BPMP via IPC | 45 | * @brief Messages sent to/from BPMP via IPC |
@@ -53,7 +52,7 @@ | |||
53 | */ | 52 | */ |
54 | 53 | ||
55 | /** | 54 | /** |
56 | * @addtogroup MRQ_Format Message Format | 55 | * @addtogroup MRQ_Format |
57 | * @{ | 56 | * @{ |
58 | * The CPU requests the BPMP to perform a particular service by | 57 | * The CPU requests the BPMP to perform a particular service by |
59 | * sending it an IVC frame containing a single MRQ message. An MRQ | 58 | * sending it an IVC frame containing a single MRQ message. An MRQ |
@@ -76,7 +75,7 @@ | |||
76 | 75 | ||
77 | /** | 76 | /** |
78 | * @ingroup MRQ_Format | 77 | * @ingroup MRQ_Format |
79 | * @brief header for an MRQ message | 78 | * @brief Header for an MRQ message |
80 | * | 79 | * |
81 | * Provides the MRQ number for the MRQ message: #mrq. The remainder of | 80 | * Provides the MRQ number for the MRQ message: #mrq. The remainder of |
82 | * the MRQ message is a payload (immediately following the | 81 | * the MRQ message is a payload (immediately following the |
@@ -86,7 +85,7 @@ struct mrq_request { | |||
86 | /** @brief MRQ number of the request */ | 85 | /** @brief MRQ number of the request */ |
87 | uint32_t mrq; | 86 | uint32_t mrq; |
88 | /** | 87 | /** |
89 | * @brief flags providing follow up directions to the receiver | 88 | * @brief Flags providing follow up directions to the receiver |
90 | * | 89 | * |
91 | * | Bit | Description | | 90 | * | Bit | Description | |
92 | * |-----|--------------------------------------------| | 91 | * |-----|--------------------------------------------| |
@@ -98,7 +97,7 @@ struct mrq_request { | |||
98 | 97 | ||
99 | /** | 98 | /** |
100 | * @ingroup MRQ_Format | 99 | * @ingroup MRQ_Format |
101 | * @brief header for an MRQ response | 100 | * @brief Header for an MRQ response |
102 | * | 101 | * |
103 | * Provides an error code for the associated MRQ message. The | 102 | * Provides an error code for the associated MRQ message. The |
104 | * remainder of the MRQ response is a payload (immediately following | 103 | * remainder of the MRQ response is a payload (immediately following |
@@ -106,9 +105,9 @@ struct mrq_request { | |||
106 | * mrq_request::mrq | 105 | * mrq_request::mrq |
107 | */ | 106 | */ |
108 | struct mrq_response { | 107 | struct mrq_response { |
109 | /** @brief error code for the MRQ request itself */ | 108 | /** @brief Error code for the MRQ request itself */ |
110 | int32_t err; | 109 | int32_t err; |
111 | /** @brief reserved for future use */ | 110 | /** @brief Reserved for future use */ |
112 | uint32_t flags; | 111 | uint32_t flags; |
113 | } __ABI_PACKED; | 112 | } __ABI_PACKED; |
114 | 113 | ||
@@ -152,6 +151,14 @@ struct mrq_response { | |||
152 | #define MRQ_TRACE_ITER 64 | 151 | #define MRQ_TRACE_ITER 64 |
153 | #define MRQ_RINGBUF_CONSOLE 65 | 152 | #define MRQ_RINGBUF_CONSOLE 65 |
154 | #define MRQ_PG 66 | 153 | #define MRQ_PG 66 |
154 | #define MRQ_CPU_NDIV_LIMITS 67 | ||
155 | #define MRQ_STRAP 68 | ||
156 | #define MRQ_UPHY 69 | ||
157 | #define MRQ_CPU_AUTO_CC3 70 | ||
158 | #define MRQ_QUERY_FW_TAG 71 | ||
159 | #define MRQ_FMON 72 | ||
160 | #define MRQ_EC 73 | ||
161 | #define MRQ_FBVOLT_STATUS 74 | ||
155 | 162 | ||
156 | /** @} */ | 163 | /** @} */ |
157 | 164 | ||
@@ -160,31 +167,35 @@ struct mrq_response { | |||
160 | * @brief Maximum MRQ code to be sent by CPU software to | 167 | * @brief Maximum MRQ code to be sent by CPU software to |
161 | * BPMP. Subject to change in future | 168 | * BPMP. Subject to change in future |
162 | */ | 169 | */ |
163 | #define MAX_CPU_MRQ_ID 66 | 170 | #define MAX_CPU_MRQ_ID 74 |
164 | 171 | ||
165 | /** | 172 | /** |
166 | * @addtogroup MRQ_Payloads Message Payloads | 173 | * @addtogroup MRQ_Payloads |
167 | * @{ | 174 | * @{ |
168 | * @defgroup Ping | 175 | * @defgroup Ping Ping |
169 | * @defgroup Query_Tag Query Tag | 176 | * @defgroup Query_Tag Query Tag |
170 | * @defgroup Module Loadable Modules | 177 | * @defgroup Module Loadable Modules |
171 | * @defgroup Trace | 178 | * @defgroup Trace Trace |
172 | * @defgroup Debugfs | 179 | * @defgroup Debugfs Debug File System |
173 | * @defgroup Reset | 180 | * @defgroup Reset Reset |
174 | * @defgroup I2C | 181 | * @defgroup I2C I2C |
175 | * @defgroup Clocks | 182 | * @defgroup Clocks Clocks |
176 | * @defgroup ABI_info ABI Info | 183 | * @defgroup ABI_info ABI Info |
177 | * @defgroup MC_Flush MC Flush | 184 | * @defgroup Powergating Power Gating |
178 | * @defgroup Powergating | 185 | * @defgroup Thermal Thermal |
179 | * @defgroup Thermal | ||
180 | * @defgroup Vhint CPU Voltage hint | 186 | * @defgroup Vhint CPU Voltage hint |
181 | * @defgroup MRQ_Deprecated Deprecated MRQ messages | 187 | * @defgroup EMC EMC |
182 | * @defgroup EMC | 188 | * @defgroup CPU NDIV Limits |
183 | * @defgroup RingbufConsole | 189 | * @defgroup RingbufConsole Ring Buffer Console |
190 | * @defgroup Strap Straps | ||
191 | * @defgroup UPHY UPHY | ||
192 | * @defgroup CC3 Auto-CC3 | ||
193 | * @defgroup FMON FMON | ||
194 | * @defgroup EC EC | ||
195 | * @defgroup Fbvolt_status Fuse Burn Voltage Status | ||
184 | * @} | 196 | * @} |
185 | */ | 197 | */ |
186 | 198 | ||
187 | |||
188 | /** | 199 | /** |
189 | * @ingroup MRQ_Codes | 200 | * @ingroup MRQ_Codes |
190 | * @def MRQ_PING | 201 | * @def MRQ_PING |
@@ -214,20 +225,20 @@ struct mrq_response { | |||
214 | 225 | ||
215 | /** | 226 | /** |
216 | * @ingroup Ping | 227 | * @ingroup Ping |
217 | * @brief request with #MRQ_PING | 228 | * @brief Request with #MRQ_PING |
218 | * | 229 | * |
219 | * Used by the sender of an #MRQ_PING message to request a pong from | 230 | * Used by the sender of an #MRQ_PING message to request a pong from |
220 | * recipient. The response from the recipient is computed based on | 231 | * recipient. The response from the recipient is computed based on |
221 | * #challenge. | 232 | * #challenge. |
222 | */ | 233 | */ |
223 | struct mrq_ping_request { | 234 | struct mrq_ping_request { |
224 | /** @brief arbitrarily chosen value */ | 235 | /** @brief Arbitrarily chosen value */ |
225 | uint32_t challenge; | 236 | uint32_t challenge; |
226 | } __ABI_PACKED; | 237 | } __ABI_PACKED; |
227 | 238 | ||
228 | /** | 239 | /** |
229 | * @ingroup Ping | 240 | * @ingroup Ping |
230 | * @brief response to #MRQ_PING | 241 | * @brief Response to #MRQ_PING |
231 | * | 242 | * |
232 | * Sent in response to an #MRQ_PING message. #reply should be the | 243 | * Sent in response to an #MRQ_PING message. #reply should be the |
233 | * mrq_ping_request challenge left shifted by 1 with the carry-bit | 244 | * mrq_ping_request challenge left shifted by 1 with the carry-bit |
@@ -235,14 +246,16 @@ struct mrq_ping_request { | |||
235 | * | 246 | * |
236 | */ | 247 | */ |
237 | struct mrq_ping_response { | 248 | struct mrq_ping_response { |
238 | /** @brief response to the MRQ_PING challege */ | 249 | /** @brief Response to the MRQ_PING challege */ |
239 | uint32_t reply; | 250 | uint32_t reply; |
240 | } __ABI_PACKED; | 251 | } __ABI_PACKED; |
241 | 252 | ||
242 | /** | 253 | /** |
243 | * @ingroup MRQ_Codes | 254 | * @ingroup MRQ_Codes |
244 | * @def MRQ_QUERY_TAG | 255 | * @def MRQ_QUERY_TAG |
245 | * @brief Query BPMP firmware's tag (i.e. version information) | 256 | * @brief Query BPMP firmware's tag (i.e. unique identifer) |
257 | * | ||
258 | * @deprecated Use #MRQ_QUERY_FW_TAG instead. | ||
246 | * | 259 | * |
247 | * * Platforms: All | 260 | * * Platforms: All |
248 | * * Initiators: CCPLEX | 261 | * * Initiators: CCPLEX |
@@ -254,25 +267,50 @@ struct mrq_ping_response { | |||
254 | 267 | ||
255 | /** | 268 | /** |
256 | * @ingroup Query_Tag | 269 | * @ingroup Query_Tag |
257 | * @brief request with #MRQ_QUERY_TAG | 270 | * @brief Request with #MRQ_QUERY_TAG |
258 | * | ||
259 | * Used by #MRQ_QUERY_TAG call to ask BPMP to fill in the memory | ||
260 | * pointed by #addr with BPMP firmware header. | ||
261 | * | 271 | * |
262 | * The sender is reponsible for ensuring that #addr is mapped in to | 272 | * @deprecated This structure will be removed in future version. |
263 | * the recipient's address map. | 273 | * Use MRQ_QUERY_FW_TAG instead. |
264 | */ | 274 | */ |
265 | struct mrq_query_tag_request { | 275 | struct mrq_query_tag_request { |
266 | /** @brief base address to store the firmware header */ | 276 | /** @brief Base address to store the firmware tag */ |
267 | uint32_t addr; | 277 | uint32_t addr; |
268 | } __ABI_PACKED; | 278 | } __ABI_PACKED; |
269 | 279 | ||
280 | |||
270 | /** | 281 | /** |
271 | * @ingroup MRQ_Codes | 282 | * @ingroup MRQ_Codes |
272 | * @def MRQ_MODULE_LOAD | 283 | * @def MRQ_QUERY_FW_TAG |
273 | * @brief dynamically load a BPMP code module | 284 | * @brief Query BPMP firmware's tag (i.e. unique identifier) |
274 | * | 285 | * |
275 | * * Platforms: All | 286 | * * Platforms: All |
287 | * * Initiators: Any | ||
288 | * * Targets: BPMP | ||
289 | * * Request Payload: N/A | ||
290 | * * Response Payload: @ref mrq_query_fw_tag_response | ||
291 | * | ||
292 | */ | ||
293 | |||
294 | /** | ||
295 | * @ingroup Query_Tag | ||
296 | * @brief Response to #MRQ_QUERY_FW_TAG | ||
297 | * | ||
298 | * Sent in response to #MRQ_QUERY_FW_TAG message. #tag contains the unique | ||
299 | * identifier for the version of firmware issuing the reply. | ||
300 | * | ||
301 | */ | ||
302 | struct mrq_query_fw_tag_response { | ||
303 | /** @brief Array to store tag information */ | ||
304 | uint8_t tag[32]; | ||
305 | } __ABI_PACKED; | ||
306 | |||
307 | /** | ||
308 | * @ingroup MRQ_Codes | ||
309 | * @def MRQ_MODULE_LOAD | ||
310 | * @brief Dynamically load a BPMP code module | ||
311 | * | ||
312 | * * Platforms: T210, T214, T186 | ||
313 | * @cond (bpmp_t210 || bpmp_t214 || bpmp_t186) | ||
276 | * * Initiators: CCPLEX | 314 | * * Initiators: CCPLEX |
277 | * * Targets: BPMP | 315 | * * Targets: BPMP |
278 | * * Request Payload: @ref mrq_module_load_request | 316 | * * Request Payload: @ref mrq_module_load_request |
@@ -284,7 +322,7 @@ struct mrq_query_tag_request { | |||
284 | 322 | ||
285 | /** | 323 | /** |
286 | * @ingroup Module | 324 | * @ingroup Module |
287 | * @brief request with #MRQ_MODULE_LOAD | 325 | * @brief Request with #MRQ_MODULE_LOAD |
288 | * | 326 | * |
289 | * Used by #MRQ_MODULE_LOAD calls to ask the recipient to dynamically | 327 | * Used by #MRQ_MODULE_LOAD calls to ask the recipient to dynamically |
290 | * load the code located at #phys_addr and having size #size | 328 | * load the code located at #phys_addr and having size #size |
@@ -300,29 +338,31 @@ struct mrq_query_tag_request { | |||
300 | * | 338 | * |
301 | */ | 339 | */ |
302 | struct mrq_module_load_request { | 340 | struct mrq_module_load_request { |
303 | /** @brief base address of the code to load. Treated as (void *) */ | 341 | /** @brief Base address of the code to load. Treated as (void *) */ |
304 | uint32_t phys_addr; /* (void *) */ | 342 | uint32_t phys_addr; /* (void *) */ |
305 | /** @brief size in bytes of code to load */ | 343 | /** @brief Size in bytes of code to load */ |
306 | uint32_t size; | 344 | uint32_t size; |
307 | } __ABI_PACKED; | 345 | } __ABI_PACKED; |
308 | 346 | ||
309 | /** | 347 | /** |
310 | * @ingroup Module | 348 | * @ingroup Module |
311 | * @brief response to #MRQ_MODULE_LOAD | 349 | * @brief Response to #MRQ_MODULE_LOAD |
312 | * | 350 | * |
313 | * @todo document mrq_response::err | 351 | * @todo document mrq_response::err |
314 | */ | 352 | */ |
315 | struct mrq_module_load_response { | 353 | struct mrq_module_load_response { |
316 | /** @brief handle to the loaded module */ | 354 | /** @brief Handle to the loaded module */ |
317 | uint32_t base; | 355 | uint32_t base; |
318 | } __ABI_PACKED; | 356 | } __ABI_PACKED; |
357 | /** @endcond*/ | ||
319 | 358 | ||
320 | /** | 359 | /** |
321 | * @ingroup MRQ_Codes | 360 | * @ingroup MRQ_Codes |
322 | * @def MRQ_MODULE_UNLOAD | 361 | * @def MRQ_MODULE_UNLOAD |
323 | * @brief unload a previously loaded code module | 362 | * @brief Unload a previously loaded code module |
324 | * | 363 | * |
325 | * * Platforms: All | 364 | * * Platforms: T210, T214, T186 |
365 | * @cond (bpmp_t210 || bpmp_t214 || bpmp_t186) | ||
326 | * * Initiators: CCPLEX | 366 | * * Initiators: CCPLEX |
327 | * * Targets: BPMP | 367 | * * Targets: BPMP |
328 | * * Request Payload: @ref mrq_module_unload_request | 368 | * * Request Payload: @ref mrq_module_unload_request |
@@ -333,20 +373,21 @@ struct mrq_module_load_response { | |||
333 | 373 | ||
334 | /** | 374 | /** |
335 | * @ingroup Module | 375 | * @ingroup Module |
336 | * @brief request with #MRQ_MODULE_UNLOAD | 376 | * @brief Request with #MRQ_MODULE_UNLOAD |
337 | * | 377 | * |
338 | * Used by #MRQ_MODULE_UNLOAD calls to request that a previously loaded | 378 | * Used by #MRQ_MODULE_UNLOAD calls to request that a previously loaded |
339 | * module be unloaded. | 379 | * module be unloaded. |
340 | */ | 380 | */ |
341 | struct mrq_module_unload_request { | 381 | struct mrq_module_unload_request { |
342 | /** @brief handle of the module to unload */ | 382 | /** @brief Handle of the module to unload */ |
343 | uint32_t base; | 383 | uint32_t base; |
344 | } __ABI_PACKED; | 384 | } __ABI_PACKED; |
385 | /** @endcond*/ | ||
345 | 386 | ||
346 | /** | 387 | /** |
347 | * @ingroup MRQ_Codes | 388 | * @ingroup MRQ_Codes |
348 | * @def MRQ_TRACE_MODIFY | 389 | * @def MRQ_TRACE_MODIFY |
349 | * @brief modify the set of enabled trace events | 390 | * @brief Modify the set of enabled trace events |
350 | * | 391 | * |
351 | * * Platforms: All | 392 | * * Platforms: All |
352 | * * Initiators: CCPLEX | 393 | * * Initiators: CCPLEX |
@@ -359,22 +400,22 @@ struct mrq_module_unload_request { | |||
359 | 400 | ||
360 | /** | 401 | /** |
361 | * @ingroup Trace | 402 | * @ingroup Trace |
362 | * @brief request with #MRQ_TRACE_MODIFY | 403 | * @brief Request with #MRQ_TRACE_MODIFY |
363 | * | 404 | * |
364 | * Used by %MRQ_TRACE_MODIFY calls to enable or disable specify trace | 405 | * Used by %MRQ_TRACE_MODIFY calls to enable or disable specify trace |
365 | * events. #set takes precedence for any bit set in both #set and | 406 | * events. #set takes precedence for any bit set in both #set and |
366 | * #clr. | 407 | * #clr. |
367 | */ | 408 | */ |
368 | struct mrq_trace_modify_request { | 409 | struct mrq_trace_modify_request { |
369 | /** @brief bit mask of trace events to disable */ | 410 | /** @brief Bit mask of trace events to disable */ |
370 | uint32_t clr; | 411 | uint32_t clr; |
371 | /** @brief bit mask of trace events to enable */ | 412 | /** @brief Bit mask of trace events to enable */ |
372 | uint32_t set; | 413 | uint32_t set; |
373 | } __ABI_PACKED; | 414 | } __ABI_PACKED; |
374 | 415 | ||
375 | /** | 416 | /** |
376 | * @ingroup Trace | 417 | * @ingroup Trace |
377 | * @brief response to #MRQ_TRACE_MODIFY | 418 | * @brief Response to #MRQ_TRACE_MODIFY |
378 | * | 419 | * |
379 | * Sent in repsonse to an #MRQ_TRACE_MODIFY message. #mask reflects the | 420 | * Sent in repsonse to an #MRQ_TRACE_MODIFY message. #mask reflects the |
380 | * state of which events are enabled after the recipient acted on the | 421 | * state of which events are enabled after the recipient acted on the |
@@ -382,7 +423,7 @@ struct mrq_trace_modify_request { | |||
382 | * | 423 | * |
383 | */ | 424 | */ |
384 | struct mrq_trace_modify_response { | 425 | struct mrq_trace_modify_response { |
385 | /** @brief bit mask of trace event enable states */ | 426 | /** @brief Bit mask of trace event enable states */ |
386 | uint32_t mask; | 427 | uint32_t mask; |
387 | } __ABI_PACKED; | 428 | } __ABI_PACKED; |
388 | 429 | ||
@@ -407,7 +448,7 @@ struct mrq_trace_modify_response { | |||
407 | 448 | ||
408 | /** | 449 | /** |
409 | * @ingroup Trace | 450 | * @ingroup Trace |
410 | * @brief request with #MRQ_WRITE_TRACE | 451 | * @brief Request with #MRQ_WRITE_TRACE |
411 | * | 452 | * |
412 | * Used by MRQ_WRITE_TRACE calls to ask the recipient to copy trace | 453 | * Used by MRQ_WRITE_TRACE calls to ask the recipient to copy trace |
413 | * data from the recipient's local buffer to the output buffer. #area | 454 | * data from the recipient's local buffer to the output buffer. #area |
@@ -420,22 +461,22 @@ struct mrq_trace_modify_response { | |||
420 | * overwrites. | 461 | * overwrites. |
421 | */ | 462 | */ |
422 | struct mrq_write_trace_request { | 463 | struct mrq_write_trace_request { |
423 | /** @brief base address of output buffer */ | 464 | /** @brief Base address of output buffer */ |
424 | uint32_t area; | 465 | uint32_t area; |
425 | /** @brief size in bytes of the output buffer */ | 466 | /** @brief Size in bytes of the output buffer */ |
426 | uint32_t size; | 467 | uint32_t size; |
427 | } __ABI_PACKED; | 468 | } __ABI_PACKED; |
428 | 469 | ||
429 | /** | 470 | /** |
430 | * @ingroup Trace | 471 | * @ingroup Trace |
431 | * @brief response to #MRQ_WRITE_TRACE | 472 | * @brief Response to #MRQ_WRITE_TRACE |
432 | * | 473 | * |
433 | * Once this response is sent, the respondent will not access the | 474 | * Once this response is sent, the respondent will not access the |
434 | * output buffer further. | 475 | * output buffer further. |
435 | */ | 476 | */ |
436 | struct mrq_write_trace_response { | 477 | struct mrq_write_trace_response { |
437 | /** | 478 | /** |
438 | * @brief flag whether more data remains in local buffer | 479 | * @brief Flag whether more data remains in local buffer |
439 | * | 480 | * |
440 | * Value is 1 if the entire local trace buffer has been | 481 | * Value is 1 if the entire local trace buffer has been |
441 | * drained to the outputbuffer. Value is 0 otherwise. | 482 | * drained to the outputbuffer. Value is 0 otherwise. |
@@ -456,9 +497,10 @@ struct mrq_threaded_ping_response { | |||
456 | /** | 497 | /** |
457 | * @ingroup MRQ_Codes | 498 | * @ingroup MRQ_Codes |
458 | * @def MRQ_MODULE_MAIL | 499 | * @def MRQ_MODULE_MAIL |
459 | * @brief send a message to a loadable module | 500 | * @brief Send a message to a loadable module |
460 | * | 501 | * |
461 | * * Platforms: All | 502 | * * Platforms: T210, T214, T186 |
503 | * @cond (bpmp_t210 || bpmp_t214 || bpmp_t186) | ||
462 | * * Initiators: Any | 504 | * * Initiators: Any |
463 | * * Targets: BPMP | 505 | * * Targets: BPMP |
464 | * * Request Payload: @ref mrq_module_mail_request | 506 | * * Request Payload: @ref mrq_module_mail_request |
@@ -469,12 +511,12 @@ struct mrq_threaded_ping_response { | |||
469 | 511 | ||
470 | /** | 512 | /** |
471 | * @ingroup Module | 513 | * @ingroup Module |
472 | * @brief request with #MRQ_MODULE_MAIL | 514 | * @brief Request with #MRQ_MODULE_MAIL |
473 | */ | 515 | */ |
474 | struct mrq_module_mail_request { | 516 | struct mrq_module_mail_request { |
475 | /** @brief handle to the previously loaded module */ | 517 | /** @brief Handle to the previously loaded module */ |
476 | uint32_t base; | 518 | uint32_t base; |
477 | /** @brief module-specific mail payload | 519 | /** @brief Module-specific mail payload |
478 | * | 520 | * |
479 | * The length of data[ ] is unknown to the BPMP core firmware | 521 | * The length of data[ ] is unknown to the BPMP core firmware |
480 | * but it is limited to the size of an IPC message. | 522 | * but it is limited to the size of an IPC message. |
@@ -484,23 +526,24 @@ struct mrq_module_mail_request { | |||
484 | 526 | ||
485 | /** | 527 | /** |
486 | * @ingroup Module | 528 | * @ingroup Module |
487 | * @brief response to #MRQ_MODULE_MAIL | 529 | * @brief Response to #MRQ_MODULE_MAIL |
488 | */ | 530 | */ |
489 | struct mrq_module_mail_response { | 531 | struct mrq_module_mail_response { |
490 | /** @brief module-specific mail payload | 532 | /** @brief Module-specific mail payload |
491 | * | 533 | * |
492 | * The length of data[ ] is unknown to the BPMP core firmware | 534 | * The length of data[ ] is unknown to the BPMP core firmware |
493 | * but it is limited to the size of an IPC message. | 535 | * but it is limited to the size of an IPC message. |
494 | */ | 536 | */ |
495 | uint8_t data[EMPTY_ARRAY]; | 537 | uint8_t data[EMPTY_ARRAY]; |
496 | } __ABI_PACKED; | 538 | } __ABI_PACKED; |
539 | /** @endcond */ | ||
497 | 540 | ||
498 | /** | 541 | /** |
499 | * @ingroup MRQ_Codes | 542 | * @ingroup MRQ_Codes |
500 | * @def MRQ_DEBUGFS | 543 | * @def MRQ_DEBUGFS |
501 | * @brief Interact with BPMP's debugfs file nodes | 544 | * @brief Interact with BPMP's debugfs file nodes |
502 | * | 545 | * |
503 | * * Platforms: T186 | 546 | * * Platforms: T186, T194 |
504 | * * Initiators: Any | 547 | * * Initiators: Any |
505 | * * Targets: BPMP | 548 | * * Targets: BPMP |
506 | * * Request Payload: @ref mrq_debugfs_request | 549 | * * Request Payload: @ref mrq_debugfs_request |
@@ -529,65 +572,70 @@ struct mrq_module_mail_response { | |||
529 | * | 572 | * |
530 | * @} | 573 | * @} |
531 | */ | 574 | */ |
575 | |||
532 | /** @ingroup Debugfs */ | 576 | /** @ingroup Debugfs */ |
533 | enum mrq_debugfs_commands { | 577 | enum mrq_debugfs_commands { |
578 | /** @brief Perform read */ | ||
534 | CMD_DEBUGFS_READ = 1, | 579 | CMD_DEBUGFS_READ = 1, |
580 | /** @brief Perform write */ | ||
535 | CMD_DEBUGFS_WRITE = 2, | 581 | CMD_DEBUGFS_WRITE = 2, |
582 | /** @brief Perform dumping directory */ | ||
536 | CMD_DEBUGFS_DUMPDIR = 3, | 583 | CMD_DEBUGFS_DUMPDIR = 3, |
584 | /** @brief Not a command */ | ||
537 | CMD_DEBUGFS_MAX | 585 | CMD_DEBUGFS_MAX |
538 | }; | 586 | }; |
539 | 587 | ||
540 | /** | 588 | /** |
541 | * @ingroup Debugfs | 589 | * @ingroup Debugfs |
542 | * @brief parameters for CMD_DEBUGFS_READ/WRITE command | 590 | * @brief Parameters for CMD_DEBUGFS_READ/WRITE command |
543 | */ | 591 | */ |
544 | struct cmd_debugfs_fileop_request { | 592 | struct cmd_debugfs_fileop_request { |
545 | /** @brief physical address pointing at filename */ | 593 | /** @brief Physical address pointing at filename */ |
546 | uint32_t fnameaddr; | 594 | uint32_t fnameaddr; |
547 | /** @brief length in bytes of filename buffer */ | 595 | /** @brief Length in bytes of filename buffer */ |
548 | uint32_t fnamelen; | 596 | uint32_t fnamelen; |
549 | /** @brief physical address pointing to data buffer */ | 597 | /** @brief Physical address pointing to data buffer */ |
550 | uint32_t dataaddr; | 598 | uint32_t dataaddr; |
551 | /** @brief length in bytes of data buffer */ | 599 | /** @brief Length in bytes of data buffer */ |
552 | uint32_t datalen; | 600 | uint32_t datalen; |
553 | } __ABI_PACKED; | 601 | } __ABI_PACKED; |
554 | 602 | ||
555 | /** | 603 | /** |
556 | * @ingroup Debugfs | 604 | * @ingroup Debugfs |
557 | * @brief parameters for CMD_DEBUGFS_READ/WRITE command | 605 | * @brief Parameters for CMD_DEBUGFS_READ/WRITE command |
558 | */ | 606 | */ |
559 | struct cmd_debugfs_dumpdir_request { | 607 | struct cmd_debugfs_dumpdir_request { |
560 | /** @brief physical address pointing to data buffer */ | 608 | /** @brief Physical address pointing to data buffer */ |
561 | uint32_t dataaddr; | 609 | uint32_t dataaddr; |
562 | /** @brief length in bytes of data buffer */ | 610 | /** @brief Length in bytes of data buffer */ |
563 | uint32_t datalen; | 611 | uint32_t datalen; |
564 | } __ABI_PACKED; | 612 | } __ABI_PACKED; |
565 | 613 | ||
566 | /** | 614 | /** |
567 | * @ingroup Debugfs | 615 | * @ingroup Debugfs |
568 | * @brief response data for CMD_DEBUGFS_READ/WRITE command | 616 | * @brief Response data for CMD_DEBUGFS_READ/WRITE command |
569 | */ | 617 | */ |
570 | struct cmd_debugfs_fileop_response { | 618 | struct cmd_debugfs_fileop_response { |
571 | /** @brief always 0 */ | 619 | /** @brief Always 0 */ |
572 | uint32_t reserved; | 620 | uint32_t reserved; |
573 | /** @brief number of bytes read from or written to data buffer */ | 621 | /** @brief Number of bytes read from or written to data buffer */ |
574 | uint32_t nbytes; | 622 | uint32_t nbytes; |
575 | } __ABI_PACKED; | 623 | } __ABI_PACKED; |
576 | 624 | ||
577 | /** | 625 | /** |
578 | * @ingroup Debugfs | 626 | * @ingroup Debugfs |
579 | * @brief response data for CMD_DEBUGFS_DUMPDIR command | 627 | * @brief Response data for CMD_DEBUGFS_DUMPDIR command |
580 | */ | 628 | */ |
581 | struct cmd_debugfs_dumpdir_response { | 629 | struct cmd_debugfs_dumpdir_response { |
582 | /** @brief always 0 */ | 630 | /** @brief Always 0 */ |
583 | uint32_t reserved; | 631 | uint32_t reserved; |
584 | /** @brief number of bytes read from or written to data buffer */ | 632 | /** @brief Number of bytes read from or written to data buffer */ |
585 | uint32_t nbytes; | 633 | uint32_t nbytes; |
586 | } __ABI_PACKED; | 634 | } __ABI_PACKED; |
587 | 635 | ||
588 | /** | 636 | /** |
589 | * @ingroup Debugfs | 637 | * @ingroup Debugfs |
590 | * @brief request with #MRQ_DEBUGFS. | 638 | * @brief Request with #MRQ_DEBUGFS. |
591 | * | 639 | * |
592 | * The sender of an MRQ_DEBUGFS message uses #cmd to specify a debugfs | 640 | * The sender of an MRQ_DEBUGFS message uses #cmd to specify a debugfs |
593 | * command to execute. Legal commands are the values of @ref | 641 | * command to execute. Legal commands are the values of @ref |
@@ -601,6 +649,7 @@ struct cmd_debugfs_dumpdir_response { | |||
601 | * |CMD_DEBUGFS_DUMPDIR|dumpdir| | 649 | * |CMD_DEBUGFS_DUMPDIR|dumpdir| |
602 | */ | 650 | */ |
603 | struct mrq_debugfs_request { | 651 | struct mrq_debugfs_request { |
652 | /** @brief Sub-command (@ref mrq_debugfs_commands) */ | ||
604 | uint32_t cmd; | 653 | uint32_t cmd; |
605 | union { | 654 | union { |
606 | struct cmd_debugfs_fileop_request fop; | 655 | struct cmd_debugfs_fileop_request fop; |
@@ -612,14 +661,14 @@ struct mrq_debugfs_request { | |||
612 | * @ingroup Debugfs | 661 | * @ingroup Debugfs |
613 | */ | 662 | */ |
614 | struct mrq_debugfs_response { | 663 | struct mrq_debugfs_response { |
615 | /** @brief always 0 */ | 664 | /** @brief Always 0 */ |
616 | int32_t reserved; | 665 | int32_t reserved; |
617 | union { | 666 | union { |
618 | /** @brief response data for CMD_DEBUGFS_READ OR | 667 | /** @brief Response data for CMD_DEBUGFS_READ OR |
619 | * CMD_DEBUGFS_WRITE command | 668 | * CMD_DEBUGFS_WRITE command |
620 | */ | 669 | */ |
621 | struct cmd_debugfs_fileop_response fop; | 670 | struct cmd_debugfs_fileop_response fop; |
622 | /** @brief response data for CMD_DEBUGFS_DUMPDIR command */ | 671 | /** @brief Response data for CMD_DEBUGFS_DUMPDIR command */ |
623 | struct cmd_debugfs_dumpdir_response dumpdir; | 672 | struct cmd_debugfs_dumpdir_response dumpdir; |
624 | } __UNION_ANON; | 673 | } __UNION_ANON; |
625 | } __ABI_PACKED; | 674 | } __ABI_PACKED; |
@@ -633,57 +682,58 @@ struct mrq_debugfs_response { | |||
633 | #define DEBUGFS_S_IWUSR (1 << 7) | 682 | #define DEBUGFS_S_IWUSR (1 << 7) |
634 | /** @} */ | 683 | /** @} */ |
635 | 684 | ||
636 | |||
637 | /** | 685 | /** |
638 | * @ingroup MRQ_Codes | 686 | * @ingroup MRQ_Codes |
639 | * @def MRQ_RESET | 687 | * @def MRQ_RESET |
640 | * @brief reset an IP block | 688 | * @brief Reset an IP block |
641 | * | 689 | * |
642 | * * Platforms: T186 | 690 | * * Platforms: T186, T194 |
643 | * * Initiators: Any | 691 | * * Initiators: Any |
644 | * * Targets: BPMP | 692 | * * Targets: BPMP |
645 | * * Request Payload: @ref mrq_reset_request | 693 | * * Request Payload: @ref mrq_reset_request |
646 | * * Response Payload: @ref mrq_reset_response | 694 | * * Response Payload: @ref mrq_reset_response |
695 | * | ||
696 | * @addtogroup Reset | ||
697 | * @{ | ||
647 | */ | 698 | */ |
648 | 699 | ||
649 | /** | ||
650 | * @ingroup Reset | ||
651 | */ | ||
652 | enum mrq_reset_commands { | 700 | enum mrq_reset_commands { |
701 | /** @brief Assert module reset */ | ||
653 | CMD_RESET_ASSERT = 1, | 702 | CMD_RESET_ASSERT = 1, |
703 | /** @brief Deassert module reset */ | ||
654 | CMD_RESET_DEASSERT = 2, | 704 | CMD_RESET_DEASSERT = 2, |
705 | /** @brief Assert and deassert the module reset */ | ||
655 | CMD_RESET_MODULE = 3, | 706 | CMD_RESET_MODULE = 3, |
707 | /** @brief Get the highest reset ID */ | ||
656 | CMD_RESET_GET_MAX_ID = 4, | 708 | CMD_RESET_GET_MAX_ID = 4, |
657 | CMD_RESET_MAX, /* not part of ABI and subject to change */ | 709 | /** @brief Not part of ABI and subject to change */ |
710 | CMD_RESET_MAX, | ||
658 | }; | 711 | }; |
659 | 712 | ||
660 | /** | 713 | /** |
661 | * @ingroup Reset | 714 | * @brief Request with MRQ_RESET |
662 | * @brief request with MRQ_RESET | ||
663 | * | 715 | * |
664 | * Used by the sender of an #MRQ_RESET message to request BPMP to | 716 | * Used by the sender of an #MRQ_RESET message to request BPMP to |
665 | * assert or or deassert a given reset line. | 717 | * assert or or deassert a given reset line. |
666 | */ | 718 | */ |
667 | struct mrq_reset_request { | 719 | struct mrq_reset_request { |
668 | /** @brief reset action to perform (@enum mrq_reset_commands) */ | 720 | /** @brief Reset action to perform (@ref mrq_reset_commands) */ |
669 | uint32_t cmd; | 721 | uint32_t cmd; |
670 | /** @brief id of the reset to affected */ | 722 | /** @brief Id of the reset to affected */ |
671 | uint32_t reset_id; | 723 | uint32_t reset_id; |
672 | } __ABI_PACKED; | 724 | } __ABI_PACKED; |
673 | 725 | ||
674 | /** | 726 | /** |
675 | * @ingroup Reset | ||
676 | * @brief Response for MRQ_RESET sub-command CMD_RESET_GET_MAX_ID. When | 727 | * @brief Response for MRQ_RESET sub-command CMD_RESET_GET_MAX_ID. When |
677 | * this sub-command is not supported, firmware will return -BPMP_EBADCMD | 728 | * this sub-command is not supported, firmware will return -BPMP_EBADCMD |
678 | * in mrq_response::err. | 729 | * in mrq_response::err. |
679 | */ | 730 | */ |
680 | struct cmd_reset_get_max_id_response { | 731 | struct cmd_reset_get_max_id_response { |
681 | /** @brief max reset id */ | 732 | /** @brief Max reset id */ |
682 | uint32_t max_id; | 733 | uint32_t max_id; |
683 | } __ABI_PACKED; | 734 | } __ABI_PACKED; |
684 | 735 | ||
685 | /** | 736 | /** |
686 | * @ingroup Reset | ||
687 | * @brief Response with MRQ_RESET | 737 | * @brief Response with MRQ_RESET |
688 | * | 738 | * |
689 | * Each sub-command supported by @ref mrq_reset_request may return | 739 | * Each sub-command supported by @ref mrq_reset_request may return |
@@ -703,32 +753,25 @@ struct mrq_reset_response { | |||
703 | } __UNION_ANON; | 753 | } __UNION_ANON; |
704 | } __ABI_PACKED; | 754 | } __ABI_PACKED; |
705 | 755 | ||
756 | /** @} */ | ||
757 | |||
706 | /** | 758 | /** |
707 | * @ingroup MRQ_Codes | 759 | * @ingroup MRQ_Codes |
708 | * @def MRQ_I2C | 760 | * @def MRQ_I2C |
709 | * @brief issue an i2c transaction | 761 | * @brief Issue an i2c transaction |
710 | * | 762 | * |
711 | * * Platforms: T186 | 763 | * * Platforms: T186, T194 |
712 | * * Initiators: Any | 764 | * * Initiators: Any |
713 | * * Targets: BPMP | 765 | * * Targets: BPMP |
714 | * * Request Payload: @ref mrq_i2c_request | 766 | * * Request Payload: @ref mrq_i2c_request |
715 | * * Response Payload: @ref mrq_i2c_response | 767 | * * Response Payload: @ref mrq_i2c_response |
716 | */ | 768 | * |
717 | |||
718 | /** | ||
719 | * @addtogroup I2C | 769 | * @addtogroup I2C |
720 | * @{ | 770 | * @{ |
721 | */ | 771 | */ |
722 | #define TEGRA_I2C_IPC_MAX_IN_BUF_SIZE (MSG_DATA_MIN_SZ - 12) | 772 | #define TEGRA_I2C_IPC_MAX_IN_BUF_SIZE (MSG_DATA_MIN_SZ - 12) |
723 | #define TEGRA_I2C_IPC_MAX_OUT_BUF_SIZE (MSG_DATA_MIN_SZ - 4) | 773 | #define TEGRA_I2C_IPC_MAX_OUT_BUF_SIZE (MSG_DATA_MIN_SZ - 4) |
724 | /** @} */ | ||
725 | 774 | ||
726 | /** | ||
727 | * @ingroup I2C | ||
728 | * @name Serial I2C flags | ||
729 | * Use these flags with serial_i2c_request::flags | ||
730 | * @{ | ||
731 | */ | ||
732 | #define SERIALI2C_TEN 0x0010 | 775 | #define SERIALI2C_TEN 0x0010 |
733 | #define SERIALI2C_RD 0x0001 | 776 | #define SERIALI2C_RD 0x0001 |
734 | #define SERIALI2C_STOP 0x8000 | 777 | #define SERIALI2C_STOP 0x8000 |
@@ -737,15 +780,13 @@ struct mrq_reset_response { | |||
737 | #define SERIALI2C_IGNORE_NAK 0x1000 | 780 | #define SERIALI2C_IGNORE_NAK 0x1000 |
738 | #define SERIALI2C_NO_RD_ACK 0x0800 | 781 | #define SERIALI2C_NO_RD_ACK 0x0800 |
739 | #define SERIALI2C_RECV_LEN 0x0400 | 782 | #define SERIALI2C_RECV_LEN 0x0400 |
740 | /** @} */ | 783 | |
741 | /** @ingroup I2C */ | ||
742 | enum { | 784 | enum { |
743 | CMD_I2C_XFER = 1 | 785 | CMD_I2C_XFER = 1 |
744 | }; | 786 | }; |
745 | 787 | ||
746 | /** | 788 | /** |
747 | * @ingroup I2C | 789 | * @brief Serializable i2c request |
748 | * @brief serializable i2c request | ||
749 | * | 790 | * |
750 | * Instances of this structure are packed (little-endian) into | 791 | * Instances of this structure are packed (little-endian) into |
751 | * cmd_i2c_xfer_request::data_buf. Each instance represents a single | 792 | * cmd_i2c_xfer_request::data_buf. Each instance represents a single |
@@ -762,80 +803,75 @@ enum { | |||
762 | struct serial_i2c_request { | 803 | struct serial_i2c_request { |
763 | /** @brief I2C slave address */ | 804 | /** @brief I2C slave address */ |
764 | uint16_t addr; | 805 | uint16_t addr; |
765 | /** @brief bitmask of SERIALI2C_ flags */ | 806 | /** @brief Bitmask of SERIALI2C_ flags */ |
766 | uint16_t flags; | 807 | uint16_t flags; |
767 | /** @brief length of I2C transaction in bytes */ | 808 | /** @brief Length of I2C transaction in bytes */ |
768 | uint16_t len; | 809 | uint16_t len; |
769 | /** @brief for write transactions only, #len bytes of data */ | 810 | /** @brief For write transactions only, #len bytes of data */ |
770 | uint8_t data[]; | 811 | uint8_t data[]; |
771 | } __ABI_PACKED; | 812 | } __ABI_PACKED; |
772 | 813 | ||
773 | /** | 814 | /** |
774 | * @ingroup I2C | 815 | * @brief Trigger one or more i2c transactions |
775 | * @brief trigger one or more i2c transactions | ||
776 | */ | 816 | */ |
777 | struct cmd_i2c_xfer_request { | 817 | struct cmd_i2c_xfer_request { |
778 | /** @brief valid bus number from mach-t186/i2c-t186.h*/ | 818 | /** @brief Valid bus number from @ref bpmp_i2c_ids*/ |
779 | uint32_t bus_id; | 819 | uint32_t bus_id; |
780 | 820 | ||
781 | /** @brief count of valid bytes in #data_buf*/ | 821 | /** @brief Count of valid bytes in #data_buf*/ |
782 | uint32_t data_size; | 822 | uint32_t data_size; |
783 | 823 | ||
784 | /** @brief serialized packed instances of @ref serial_i2c_request*/ | 824 | /** @brief Serialized packed instances of @ref serial_i2c_request*/ |
785 | uint8_t data_buf[TEGRA_I2C_IPC_MAX_IN_BUF_SIZE]; | 825 | uint8_t data_buf[TEGRA_I2C_IPC_MAX_IN_BUF_SIZE]; |
786 | } __ABI_PACKED; | 826 | } __ABI_PACKED; |
787 | 827 | ||
788 | /** | 828 | /** |
789 | * @ingroup I2C | 829 | * @brief Container for data read from the i2c bus |
790 | * @brief container for data read from the i2c bus | ||
791 | * | 830 | * |
792 | * Processing an cmd_i2c_xfer_request::data_buf causes BPMP to execute | 831 | * Processing an cmd_i2c_xfer_request::data_buf causes BPMP to execute |
793 | * zero or more I2C reads. The data read from the bus is serialized | 832 | * zero or more I2C reads. The data read from the bus is serialized |
794 | * into #data_buf. | 833 | * into #data_buf. |
795 | */ | 834 | */ |
796 | struct cmd_i2c_xfer_response { | 835 | struct cmd_i2c_xfer_response { |
797 | /** @brief count of valid bytes in #data_buf*/ | 836 | /** @brief Count of valid bytes in #data_buf*/ |
798 | uint32_t data_size; | 837 | uint32_t data_size; |
799 | /** @brief i2c read data */ | 838 | /** @brief I2c read data */ |
800 | uint8_t data_buf[TEGRA_I2C_IPC_MAX_OUT_BUF_SIZE]; | 839 | uint8_t data_buf[TEGRA_I2C_IPC_MAX_OUT_BUF_SIZE]; |
801 | } __ABI_PACKED; | 840 | } __ABI_PACKED; |
802 | 841 | ||
803 | /** | 842 | /** |
804 | * @ingroup I2C | 843 | * @brief Request with #MRQ_I2C |
805 | * @brief request with #MRQ_I2C | ||
806 | */ | 844 | */ |
807 | struct mrq_i2c_request { | 845 | struct mrq_i2c_request { |
808 | /** @brief always CMD_I2C_XFER (i.e. 1) */ | 846 | /** @brief Always CMD_I2C_XFER (i.e. 1) */ |
809 | uint32_t cmd; | 847 | uint32_t cmd; |
810 | /** @brief parameters of the transfer request */ | 848 | /** @brief Parameters of the transfer request */ |
811 | struct cmd_i2c_xfer_request xfer; | 849 | struct cmd_i2c_xfer_request xfer; |
812 | } __ABI_PACKED; | 850 | } __ABI_PACKED; |
813 | 851 | ||
814 | /** | 852 | /** |
815 | * @ingroup I2C | 853 | * @brief Response to #MRQ_I2C |
816 | * @brief response to #MRQ_I2C | ||
817 | */ | 854 | */ |
818 | struct mrq_i2c_response { | 855 | struct mrq_i2c_response { |
819 | struct cmd_i2c_xfer_response xfer; | 856 | struct cmd_i2c_xfer_response xfer; |
820 | } __ABI_PACKED; | 857 | } __ABI_PACKED; |
821 | 858 | ||
859 | /** @} */ | ||
860 | |||
822 | /** | 861 | /** |
823 | * @ingroup MRQ_Codes | 862 | * @ingroup MRQ_Codes |
824 | * @def MRQ_CLK | 863 | * @def MRQ_CLK |
864 | * @brief Perform a clock operation | ||
825 | * | 865 | * |
826 | * * Platforms: T186 | 866 | * * Platforms: T186, T194 |
827 | * * Initiators: Any | 867 | * * Initiators: Any |
828 | * * Targets: BPMP | 868 | * * Targets: BPMP |
829 | * * Request Payload: @ref mrq_clk_request | 869 | * * Request Payload: @ref mrq_clk_request |
830 | * * Response Payload: @ref mrq_clk_response | 870 | * * Response Payload: @ref mrq_clk_response |
871 | * | ||
831 | * @addtogroup Clocks | 872 | * @addtogroup Clocks |
832 | * @{ | 873 | * @{ |
833 | */ | 874 | */ |
834 | |||
835 | /** | ||
836 | * @name MRQ_CLK sub-commands | ||
837 | * @{ | ||
838 | */ | ||
839 | enum { | 875 | enum { |
840 | CMD_CLK_GET_RATE = 1, | 876 | CMD_CLK_GET_RATE = 1, |
841 | CMD_CLK_SET_RATE = 2, | 877 | CMD_CLK_SET_RATE = 2, |
@@ -847,20 +883,13 @@ enum { | |||
847 | CMD_CLK_DISABLE = 8, | 883 | CMD_CLK_DISABLE = 8, |
848 | CMD_CLK_GET_ALL_INFO = 14, | 884 | CMD_CLK_GET_ALL_INFO = 14, |
849 | CMD_CLK_GET_MAX_CLK_ID = 15, | 885 | CMD_CLK_GET_MAX_CLK_ID = 15, |
886 | CMD_CLK_GET_FMAX_AT_VMIN = 16, | ||
850 | CMD_CLK_MAX, | 887 | CMD_CLK_MAX, |
851 | }; | 888 | }; |
852 | /** @} */ | ||
853 | 889 | ||
854 | /** | ||
855 | * @name MRQ_CLK properties | ||
856 | * Flag bits for cmd_clk_properties_response::flags and | ||
857 | * cmd_clk_get_all_info_response::flags | ||
858 | * @{ | ||
859 | */ | ||
860 | #define BPMP_CLK_HAS_MUX (1 << 0) | 890 | #define BPMP_CLK_HAS_MUX (1 << 0) |
861 | #define BPMP_CLK_HAS_SET_RATE (1 << 1) | 891 | #define BPMP_CLK_HAS_SET_RATE (1 << 1) |
862 | #define BPMP_CLK_IS_ROOT (1 << 2) | 892 | #define BPMP_CLK_IS_ROOT (1 << 2) |
863 | /** @} */ | ||
864 | 893 | ||
865 | #define MRQ_CLK_NAME_MAXLEN 40 | 894 | #define MRQ_CLK_NAME_MAXLEN 40 |
866 | #define MRQ_CLK_MAX_PARENTS 16 | 895 | #define MRQ_CLK_MAX_PARENTS 16 |
@@ -959,11 +988,19 @@ struct cmd_clk_get_max_clk_id_request { | |||
959 | struct cmd_clk_get_max_clk_id_response { | 988 | struct cmd_clk_get_max_clk_id_response { |
960 | uint32_t max_id; | 989 | uint32_t max_id; |
961 | } __ABI_PACKED; | 990 | } __ABI_PACKED; |
962 | /** @} */ | 991 | |
992 | /** @private */ | ||
993 | struct cmd_clk_get_fmax_at_vmin_request { | ||
994 | EMPTY | ||
995 | } __ABI_PACKED; | ||
996 | |||
997 | struct cmd_clk_get_fmax_at_vmin_response { | ||
998 | int64_t rate; | ||
999 | } __ABI_PACKED; | ||
963 | 1000 | ||
964 | /** | 1001 | /** |
965 | * @ingroup Clocks | 1002 | * @ingroup Clocks |
966 | * @brief request with #MRQ_CLK | 1003 | * @brief Request with #MRQ_CLK |
967 | * | 1004 | * |
968 | * Used by the sender of an #MRQ_CLK message to control clocks. The | 1005 | * Used by the sender of an #MRQ_CLK message to control clocks. The |
969 | * clk_request is split into several sub-commands. Some sub-commands | 1006 | * clk_request is split into several sub-commands. Some sub-commands |
@@ -982,11 +1019,13 @@ struct cmd_clk_get_max_clk_id_response { | |||
982 | * |CMD_CLK_DISABLE |- | | 1019 | * |CMD_CLK_DISABLE |- | |
983 | * |CMD_CLK_GET_ALL_INFO |- | | 1020 | * |CMD_CLK_GET_ALL_INFO |- | |
984 | * |CMD_CLK_GET_MAX_CLK_ID |- | | 1021 | * |CMD_CLK_GET_MAX_CLK_ID |- | |
1022 | * |CMD_CLK_GET_FMAX_AT_VMIN |- | ||
1023 | * | | ||
985 | * | 1024 | * |
986 | */ | 1025 | */ |
987 | 1026 | ||
988 | struct mrq_clk_request { | 1027 | struct mrq_clk_request { |
989 | /** @brief sub-command and clock id concatenated to 32-bit word. | 1028 | /** @brief Sub-command and clock id concatenated to 32-bit word. |
990 | * - bits[31..24] is the sub-cmd. | 1029 | * - bits[31..24] is the sub-cmd. |
991 | * - bits[23..0] is the clock id | 1030 | * - bits[23..0] is the clock id |
992 | */ | 1031 | */ |
@@ -1010,12 +1049,14 @@ struct mrq_clk_request { | |||
1010 | struct cmd_clk_get_all_info_request clk_get_all_info; | 1049 | struct cmd_clk_get_all_info_request clk_get_all_info; |
1011 | /** @private */ | 1050 | /** @private */ |
1012 | struct cmd_clk_get_max_clk_id_request clk_get_max_clk_id; | 1051 | struct cmd_clk_get_max_clk_id_request clk_get_max_clk_id; |
1052 | /** @private */ | ||
1053 | struct cmd_clk_get_fmax_at_vmin_request clk_get_fmax_at_vmin; | ||
1013 | } __UNION_ANON; | 1054 | } __UNION_ANON; |
1014 | } __ABI_PACKED; | 1055 | } __ABI_PACKED; |
1015 | 1056 | ||
1016 | /** | 1057 | /** |
1017 | * @ingroup Clocks | 1058 | * @ingroup Clocks |
1018 | * @brief response to MRQ_CLK | 1059 | * @brief Response to MRQ_CLK |
1019 | * | 1060 | * |
1020 | * Each sub-command supported by @ref mrq_clk_request may return | 1061 | * Each sub-command supported by @ref mrq_clk_request may return |
1021 | * sub-command-specific data. Some do and some do not as indicated in | 1062 | * sub-command-specific data. Some do and some do not as indicated in |
@@ -1033,6 +1074,7 @@ struct mrq_clk_request { | |||
1033 | * |CMD_CLK_DISABLE |- | | 1074 | * |CMD_CLK_DISABLE |- | |
1034 | * |CMD_CLK_GET_ALL_INFO |clk_get_all_info | | 1075 | * |CMD_CLK_GET_ALL_INFO |clk_get_all_info | |
1035 | * |CMD_CLK_GET_MAX_CLK_ID |clk_get_max_id | | 1076 | * |CMD_CLK_GET_MAX_CLK_ID |clk_get_max_id | |
1077 | * |CMD_CLK_GET_FMAX_AT_VMIN |clk_get_fmax_at_vmin | | ||
1036 | * | 1078 | * |
1037 | */ | 1079 | */ |
1038 | 1080 | ||
@@ -1050,13 +1092,16 @@ struct mrq_clk_response { | |||
1050 | struct cmd_clk_is_enabled_response clk_is_enabled; | 1092 | struct cmd_clk_is_enabled_response clk_is_enabled; |
1051 | struct cmd_clk_get_all_info_response clk_get_all_info; | 1093 | struct cmd_clk_get_all_info_response clk_get_all_info; |
1052 | struct cmd_clk_get_max_clk_id_response clk_get_max_clk_id; | 1094 | struct cmd_clk_get_max_clk_id_response clk_get_max_clk_id; |
1095 | struct cmd_clk_get_fmax_at_vmin_response clk_get_fmax_at_vmin; | ||
1053 | } __UNION_ANON; | 1096 | } __UNION_ANON; |
1054 | } __ABI_PACKED; | 1097 | } __ABI_PACKED; |
1055 | 1098 | ||
1099 | /** @} */ | ||
1100 | |||
1056 | /** | 1101 | /** |
1057 | * @ingroup MRQ_Codes | 1102 | * @ingroup MRQ_Codes |
1058 | * @def MRQ_QUERY_ABI | 1103 | * @def MRQ_QUERY_ABI |
1059 | * @brief check if an MRQ is implemented | 1104 | * @brief Check if an MRQ is implemented |
1060 | * | 1105 | * |
1061 | * * Platforms: All | 1106 | * * Platforms: All |
1062 | * * Initiators: Any | 1107 | * * Initiators: Any |
@@ -1067,7 +1112,7 @@ struct mrq_clk_response { | |||
1067 | 1112 | ||
1068 | /** | 1113 | /** |
1069 | * @ingroup ABI_info | 1114 | * @ingroup ABI_info |
1070 | * @brief request with MRQ_QUERY_ABI | 1115 | * @brief Request with MRQ_QUERY_ABI |
1071 | * | 1116 | * |
1072 | * Used by #MRQ_QUERY_ABI call to check if MRQ code #mrq is supported | 1117 | * Used by #MRQ_QUERY_ABI call to check if MRQ code #mrq is supported |
1073 | * by the recipient. | 1118 | * by the recipient. |
@@ -1079,7 +1124,7 @@ struct mrq_query_abi_request { | |||
1079 | 1124 | ||
1080 | /** | 1125 | /** |
1081 | * @ingroup ABI_info | 1126 | * @ingroup ABI_info |
1082 | * @brief response to MRQ_QUERY_ABI | 1127 | * @brief Response to MRQ_QUERY_ABI |
1083 | * | 1128 | * |
1084 | * @note mrq_response::err of 0 indicates that the query was | 1129 | * @note mrq_response::err of 0 indicates that the query was |
1085 | * successful, not that the MRQ itself is supported! | 1130 | * successful, not that the MRQ itself is supported! |
@@ -1092,19 +1137,19 @@ struct mrq_query_abi_response { | |||
1092 | /** | 1137 | /** |
1093 | * @ingroup MRQ_Codes | 1138 | * @ingroup MRQ_Codes |
1094 | * @def MRQ_PG_READ_STATE | 1139 | * @def MRQ_PG_READ_STATE |
1095 | * @brief read the power-gating state of a partition | 1140 | * @brief Read the power-gating state of a partition |
1096 | * | 1141 | * |
1097 | * * Platforms: T186 | 1142 | * * Platforms: T186 |
1143 | * @cond bpmp_t186 | ||
1098 | * * Initiators: Any | 1144 | * * Initiators: Any |
1099 | * * Targets: BPMP | 1145 | * * Targets: BPMP |
1100 | * * Request Payload: @ref mrq_pg_read_state_request | 1146 | * * Request Payload: @ref mrq_pg_read_state_request |
1101 | * * Response Payload: @ref mrq_pg_read_state_response | 1147 | * * Response Payload: @ref mrq_pg_read_state_response |
1102 | * @addtogroup Powergating | ||
1103 | * @{ | ||
1104 | */ | 1148 | */ |
1105 | 1149 | ||
1106 | /** | 1150 | /** |
1107 | * @brief request with #MRQ_PG_READ_STATE | 1151 | * @ingroup Powergating |
1152 | * @brief Request with #MRQ_PG_READ_STATE | ||
1108 | * | 1153 | * |
1109 | * Used by MRQ_PG_READ_STATE call to read the current state of a | 1154 | * Used by MRQ_PG_READ_STATE call to read the current state of a |
1110 | * partition. | 1155 | * partition. |
@@ -1115,39 +1160,40 @@ struct mrq_pg_read_state_request { | |||
1115 | } __ABI_PACKED; | 1160 | } __ABI_PACKED; |
1116 | 1161 | ||
1117 | /** | 1162 | /** |
1118 | * @brief response to MRQ_PG_READ_STATE | 1163 | * @ingroup Powergating |
1164 | * @brief Response to MRQ_PG_READ_STATE | ||
1119 | * @todo define possible errors. | 1165 | * @todo define possible errors. |
1120 | */ | 1166 | */ |
1121 | struct mrq_pg_read_state_response { | 1167 | struct mrq_pg_read_state_response { |
1122 | /** @brief read as don't care */ | 1168 | /** @brief Read as don't care */ |
1123 | uint32_t sram_state; | 1169 | uint32_t sram_state; |
1124 | /** @brief state of power partition | 1170 | /** @brief State of power partition |
1125 | * * 0 : off | 1171 | * * 0 : off |
1126 | * * 1 : on | 1172 | * * 1 : on |
1127 | */ | 1173 | */ |
1128 | uint32_t logic_state; | 1174 | uint32_t logic_state; |
1129 | } __ABI_PACKED; | 1175 | } __ABI_PACKED; |
1130 | 1176 | /** @endcond*/ | |
1131 | /** @} */ | 1177 | /** @} */ |
1132 | 1178 | ||
1133 | /** | 1179 | /** |
1134 | * @ingroup MRQ_Codes | 1180 | * @ingroup MRQ_Codes |
1135 | * @def MRQ_PG_UPDATE_STATE | 1181 | * @def MRQ_PG_UPDATE_STATE |
1136 | * @brief modify the power-gating state of a partition. In contrast to | 1182 | * @brief Modify the power-gating state of a partition. In contrast to |
1137 | * MRQ_PG calls, the operations that change state (on/off) of power | 1183 | * MRQ_PG calls, the operations that change state (on/off) of power |
1138 | * partition are reference counted. | 1184 | * partition are reference counted. |
1139 | * | 1185 | * |
1140 | * * Platforms: T186 | 1186 | * * Platforms: T186 |
1187 | * @cond bpmp_t186 | ||
1141 | * * Initiators: Any | 1188 | * * Initiators: Any |
1142 | * * Targets: BPMP | 1189 | * * Targets: BPMP |
1143 | * * Request Payload: @ref mrq_pg_update_state_request | 1190 | * * Request Payload: @ref mrq_pg_update_state_request |
1144 | * * Response Payload: N/A | 1191 | * * Response Payload: N/A |
1145 | * @addtogroup Powergating | ||
1146 | * @{ | ||
1147 | */ | 1192 | */ |
1148 | 1193 | ||
1149 | /** | 1194 | /** |
1150 | * @brief request with mrq_pg_update_state_request | 1195 | * @ingroup Powergating |
1196 | * @brief Request with mrq_pg_update_state_request | ||
1151 | * | 1197 | * |
1152 | * Used by #MRQ_PG_UPDATE_STATE call to request BPMP to change the | 1198 | * Used by #MRQ_PG_UPDATE_STATE call to request BPMP to change the |
1153 | * state of a power partition #partition_id. | 1199 | * state of a power partition #partition_id. |
@@ -1155,20 +1201,20 @@ struct mrq_pg_read_state_response { | |||
1155 | struct mrq_pg_update_state_request { | 1201 | struct mrq_pg_update_state_request { |
1156 | /** @brief ID of partition */ | 1202 | /** @brief ID of partition */ |
1157 | uint32_t partition_id; | 1203 | uint32_t partition_id; |
1158 | /** @brief secondary control of power partition | 1204 | /** @brief Secondary control of power partition |
1159 | * @details Ignored by many versions of the BPMP | 1205 | * @details Ignored by many versions of the BPMP |
1160 | * firmware. For maximum compatibility, set the value | 1206 | * firmware. For maximum compatibility, set the value |
1161 | * according to @logic_state | 1207 | * according to @ref logic_state |
1162 | * * 0x1: power ON partition (@ref logic_state == 0x3) | 1208 | * * 0x1: power ON partition (@ref logic_state == 0x3) |
1163 | * * 0x3: power OFF partition (@ref logic_state == 0x1) | 1209 | * * 0x3: power OFF partition (@ref logic_state == 0x1) |
1164 | */ | 1210 | */ |
1165 | uint32_t sram_state; | 1211 | uint32_t sram_state; |
1166 | /** @brief controls state of power partition, legal values are | 1212 | /** @brief Controls state of power partition, legal values are |
1167 | * * 0x1 : power OFF partition | 1213 | * * 0x1 : power OFF partition |
1168 | * * 0x3 : power ON partition | 1214 | * * 0x3 : power ON partition |
1169 | */ | 1215 | */ |
1170 | uint32_t logic_state; | 1216 | uint32_t logic_state; |
1171 | /** @brief change state of clocks of the power partition, legal values | 1217 | /** @brief Change state of clocks of the power partition, legal values |
1172 | * * 0x0 : do not change clock state | 1218 | * * 0x0 : do not change clock state |
1173 | * * 0x1 : disable partition clocks (only applicable when | 1219 | * * 0x1 : disable partition clocks (only applicable when |
1174 | * @ref logic_state == 0x1) | 1220 | * @ref logic_state == 0x1) |
@@ -1177,7 +1223,7 @@ struct mrq_pg_update_state_request { | |||
1177 | */ | 1223 | */ |
1178 | uint32_t clock_state; | 1224 | uint32_t clock_state; |
1179 | } __ABI_PACKED; | 1225 | } __ABI_PACKED; |
1180 | /** @} */ | 1226 | /** @endcond*/ |
1181 | 1227 | ||
1182 | /** | 1228 | /** |
1183 | * @ingroup MRQ_Codes | 1229 | * @ingroup MRQ_Codes |
@@ -1186,19 +1232,20 @@ struct mrq_pg_update_state_request { | |||
1186 | * MRQ_PG_UPDATE_STATE, operations that change the power partition | 1232 | * MRQ_PG_UPDATE_STATE, operations that change the power partition |
1187 | * state are NOT reference counted | 1233 | * state are NOT reference counted |
1188 | * | 1234 | * |
1189 | * * Platforms: T186 | 1235 | * @note BPMP-FW forcefully turns off some partitions as part of SC7 entry |
1236 | * because their state cannot be adequately restored on exit. Therefore, | ||
1237 | * it is recommended to power off all domains via MRQ_PG prior to SC7 entry. | ||
1238 | * See @ref bpmp_pdomain_ids for further detail. | ||
1239 | * | ||
1240 | * * Platforms: T186, T194 | ||
1190 | * * Initiators: Any | 1241 | * * Initiators: Any |
1191 | * * Targets: BPMP | 1242 | * * Targets: BPMP |
1192 | * * Request Payload: @ref mrq_pg_request | 1243 | * * Request Payload: @ref mrq_pg_request |
1193 | * * Response Payload: @ref mrq_pg_response | 1244 | * * Response Payload: @ref mrq_pg_response |
1245 | * | ||
1194 | * @addtogroup Powergating | 1246 | * @addtogroup Powergating |
1195 | * @{ | 1247 | * @{ |
1196 | */ | 1248 | */ |
1197 | |||
1198 | /** | ||
1199 | * @name MRQ_PG sub-commands | ||
1200 | * @{ | ||
1201 | */ | ||
1202 | enum mrq_pg_cmd { | 1249 | enum mrq_pg_cmd { |
1203 | /** | 1250 | /** |
1204 | * @brief Check whether the BPMP driver supports the specified | 1251 | * @brief Check whether the BPMP driver supports the specified |
@@ -1232,7 +1279,7 @@ enum mrq_pg_cmd { | |||
1232 | CMD_PG_GET_STATE = 2, | 1279 | CMD_PG_GET_STATE = 2, |
1233 | 1280 | ||
1234 | /** | 1281 | /** |
1235 | * @brief get the name string of specified power domain id. | 1282 | * @brief Get the name string of specified power domain id. |
1236 | * | 1283 | * |
1237 | * mrq_response:err is | 1284 | * mrq_response:err is |
1238 | * 0: Success | 1285 | * 0: Success |
@@ -1242,7 +1289,7 @@ enum mrq_pg_cmd { | |||
1242 | 1289 | ||
1243 | 1290 | ||
1244 | /** | 1291 | /** |
1245 | * @brief get the highest power domain id in the system. Not | 1292 | * @brief Get the highest power domain id in the system. Not |
1246 | * all IDs between 0 and max_id are valid IDs. | 1293 | * all IDs between 0 and max_id are valid IDs. |
1247 | * | 1294 | * |
1248 | * mrq_response:err is | 1295 | * mrq_response:err is |
@@ -1251,35 +1298,36 @@ enum mrq_pg_cmd { | |||
1251 | */ | 1298 | */ |
1252 | CMD_PG_GET_MAX_ID = 4, | 1299 | CMD_PG_GET_MAX_ID = 4, |
1253 | }; | 1300 | }; |
1254 | /** @} */ | ||
1255 | 1301 | ||
1256 | #define MRQ_PG_NAME_MAXLEN 40 | 1302 | #define MRQ_PG_NAME_MAXLEN 40 |
1257 | 1303 | ||
1258 | /** | ||
1259 | * @brief possible power domain states in | ||
1260 | * cmd_pg_set_state_request:state and cmd_pg_get_state_response:state. | ||
1261 | * PG_STATE_OFF: power domain is OFF | ||
1262 | * PG_STATE_ON: power domain is ON | ||
1263 | * PG_STATE_RUNNING: power domain is ON and made into directly usable | ||
1264 | * state by turning on the clocks associated with | ||
1265 | * the domain | ||
1266 | */ | ||
1267 | enum pg_states { | 1304 | enum pg_states { |
1305 | /** @brief Power domain is OFF */ | ||
1268 | PG_STATE_OFF = 0, | 1306 | PG_STATE_OFF = 0, |
1307 | /** @brief Power domain is ON */ | ||
1269 | PG_STATE_ON = 1, | 1308 | PG_STATE_ON = 1, |
1309 | /** | ||
1310 | * @brief a legacy state where power domain and the clock | ||
1311 | * associated to the domain are ON. | ||
1312 | * This state is only supported in T186, and the use of it is | ||
1313 | * deprecated. | ||
1314 | */ | ||
1270 | PG_STATE_RUNNING = 2, | 1315 | PG_STATE_RUNNING = 2, |
1271 | }; | 1316 | }; |
1272 | 1317 | ||
1273 | struct cmd_pg_query_abi_request { | 1318 | struct cmd_pg_query_abi_request { |
1274 | uint32_t type; /* enum mrq_pg_cmd */ | 1319 | /** @ref mrq_pg_cmd */ |
1320 | uint32_t type; | ||
1275 | } __ABI_PACKED; | 1321 | } __ABI_PACKED; |
1276 | 1322 | ||
1277 | struct cmd_pg_set_state_request { | 1323 | struct cmd_pg_set_state_request { |
1278 | uint32_t state; /* enum pg_states */ | 1324 | /** @ref pg_states */ |
1325 | uint32_t state; | ||
1279 | } __ABI_PACKED; | 1326 | } __ABI_PACKED; |
1280 | 1327 | ||
1281 | struct cmd_pg_get_state_response { | 1328 | struct cmd_pg_get_state_response { |
1282 | uint32_t state; /* enum pg_states */ | 1329 | /** @ref pg_states */ |
1330 | uint32_t state; | ||
1283 | } __ABI_PACKED; | 1331 | } __ABI_PACKED; |
1284 | 1332 | ||
1285 | struct cmd_pg_get_name_response { | 1333 | struct cmd_pg_get_name_response { |
@@ -1291,8 +1339,7 @@ struct cmd_pg_get_max_id_response { | |||
1291 | } __ABI_PACKED; | 1339 | } __ABI_PACKED; |
1292 | 1340 | ||
1293 | /** | 1341 | /** |
1294 | * @ingroup Powergating | 1342 | * @brief Request with #MRQ_PG |
1295 | * @brief request with #MRQ_PG | ||
1296 | * | 1343 | * |
1297 | * Used by the sender of an #MRQ_PG message to control power | 1344 | * Used by the sender of an #MRQ_PG message to control power |
1298 | * partitions. The pg_request is split into several sub-commands. Some | 1345 | * partitions. The pg_request is split into several sub-commands. Some |
@@ -1308,7 +1355,6 @@ struct cmd_pg_get_max_id_response { | |||
1308 | * |CMD_PG_GET_MAX_ID | - | | 1355 | * |CMD_PG_GET_MAX_ID | - | |
1309 | * | 1356 | * |
1310 | */ | 1357 | */ |
1311 | |||
1312 | struct mrq_pg_request { | 1358 | struct mrq_pg_request { |
1313 | uint32_t cmd; | 1359 | uint32_t cmd; |
1314 | uint32_t id; | 1360 | uint32_t id; |
@@ -1319,8 +1365,7 @@ struct mrq_pg_request { | |||
1319 | } __ABI_PACKED; | 1365 | } __ABI_PACKED; |
1320 | 1366 | ||
1321 | /** | 1367 | /** |
1322 | * @ingroup Powergating | 1368 | * @brief Response to MRQ_PG |
1323 | * @brief response to MRQ_PG | ||
1324 | * | 1369 | * |
1325 | * Each sub-command supported by @ref mrq_pg_request may return | 1370 | * Each sub-command supported by @ref mrq_pg_request may return |
1326 | * sub-command-specific data. Some do and some do not as indicated in | 1371 | * sub-command-specific data. Some do and some do not as indicated in |
@@ -1333,9 +1378,7 @@ struct mrq_pg_request { | |||
1333 | * |CMD_PG_GET_STATE | get_state | | 1378 | * |CMD_PG_GET_STATE | get_state | |
1334 | * |CMD_PG_GET_NAME | get_name | | 1379 | * |CMD_PG_GET_NAME | get_name | |
1335 | * |CMD_PG_GET_MAX_ID | get_max_id | | 1380 | * |CMD_PG_GET_MAX_ID | get_max_id | |
1336 | * | ||
1337 | */ | 1381 | */ |
1338 | |||
1339 | struct mrq_pg_response { | 1382 | struct mrq_pg_response { |
1340 | union { | 1383 | union { |
1341 | struct cmd_pg_get_state_response get_state; | 1384 | struct cmd_pg_get_state_response get_state; |
@@ -1344,12 +1387,14 @@ struct mrq_pg_response { | |||
1344 | } __UNION_ANON; | 1387 | } __UNION_ANON; |
1345 | } __ABI_PACKED; | 1388 | } __ABI_PACKED; |
1346 | 1389 | ||
1390 | /** @} */ | ||
1391 | |||
1347 | /** | 1392 | /** |
1348 | * @ingroup MRQ_Codes | 1393 | * @ingroup MRQ_Codes |
1349 | * @def MRQ_THERMAL | 1394 | * @def MRQ_THERMAL |
1350 | * @brief interact with BPMP thermal framework | 1395 | * @brief Interact with BPMP thermal framework |
1351 | * | 1396 | * |
1352 | * * Platforms: T186 | 1397 | * * Platforms: T186, T194 |
1353 | * * Initiators: Any | 1398 | * * Initiators: Any |
1354 | * * Targets: Any | 1399 | * * Targets: Any |
1355 | * * Request Payload: TODO | 1400 | * * Request Payload: TODO |
@@ -1562,17 +1607,18 @@ union mrq_thermal_bpmp_to_host_response { | |||
1562 | * @brief Query CPU voltage hint data | 1607 | * @brief Query CPU voltage hint data |
1563 | * | 1608 | * |
1564 | * * Platforms: T186 | 1609 | * * Platforms: T186 |
1610 | * @cond bpmp_t186 | ||
1565 | * * Initiators: CCPLEX | 1611 | * * Initiators: CCPLEX |
1566 | * * Targets: BPMP | 1612 | * * Targets: BPMP |
1567 | * * Request Payload: @ref mrq_cpu_vhint_request | 1613 | * * Request Payload: @ref mrq_cpu_vhint_request |
1568 | * * Response Payload: N/A | 1614 | * * Response Payload: N/A |
1569 | * | 1615 | * |
1570 | * @addtogroup Vhint CPU Voltage hint | 1616 | * @addtogroup Vhint |
1571 | * @{ | 1617 | * @{ |
1572 | */ | 1618 | */ |
1573 | 1619 | ||
1574 | /** | 1620 | /** |
1575 | * @brief request with #MRQ_CPU_VHINT | 1621 | * @brief Request with #MRQ_CPU_VHINT |
1576 | * | 1622 | * |
1577 | * Used by #MRQ_CPU_VHINT call by CCPLEX to retrieve voltage hint data | 1623 | * Used by #MRQ_CPU_VHINT call by CCPLEX to retrieve voltage hint data |
1578 | * from BPMP to memory space pointed by #addr. CCPLEX is responsible | 1624 | * from BPMP to memory space pointed by #addr. CCPLEX is responsible |
@@ -1581,16 +1627,16 @@ union mrq_thermal_bpmp_to_host_response { | |||
1581 | */ | 1627 | */ |
1582 | struct mrq_cpu_vhint_request { | 1628 | struct mrq_cpu_vhint_request { |
1583 | /** @brief IOVA address for the #cpu_vhint_data */ | 1629 | /** @brief IOVA address for the #cpu_vhint_data */ |
1584 | uint32_t addr; /* struct cpu_vhint_data * */ | 1630 | uint32_t addr; |
1585 | /** @brief ID of the cluster whose data is requested */ | 1631 | /** @brief ID of the cluster whose data is requested */ |
1586 | uint32_t cluster_id; /* enum cluster_id */ | 1632 | uint32_t cluster_id; |
1587 | } __ABI_PACKED; | 1633 | } __ABI_PACKED; |
1588 | 1634 | ||
1589 | /** | 1635 | /** |
1590 | * @brief description of the CPU v/f relation | 1636 | * @brief Description of the CPU v/f relation |
1591 | * | 1637 | * |
1592 | * Used by #MRQ_CPU_VHINT call to carry data pointed by #addr of | 1638 | * Used by #MRQ_CPU_VHINT call to carry data pointed by |
1593 | * struct mrq_cpu_vhint_request | 1639 | * #mrq_cpu_vhint_request::addr |
1594 | */ | 1640 | */ |
1595 | struct cpu_vhint_data { | 1641 | struct cpu_vhint_data { |
1596 | uint32_t ref_clk_hz; /**< reference frequency in Hz */ | 1642 | uint32_t ref_clk_hz; /**< reference frequency in Hz */ |
@@ -1612,7 +1658,7 @@ struct cpu_vhint_data { | |||
1612 | /** reserved for future use */ | 1658 | /** reserved for future use */ |
1613 | uint16_t reserved[328]; | 1659 | uint16_t reserved[328]; |
1614 | } __ABI_PACKED; | 1660 | } __ABI_PACKED; |
1615 | 1661 | /** @endcond */ | |
1616 | /** @} */ | 1662 | /** @} */ |
1617 | 1663 | ||
1618 | /** | 1664 | /** |
@@ -1620,7 +1666,7 @@ struct cpu_vhint_data { | |||
1620 | * @def MRQ_ABI_RATCHET | 1666 | * @def MRQ_ABI_RATCHET |
1621 | * @brief ABI ratchet value query | 1667 | * @brief ABI ratchet value query |
1622 | * | 1668 | * |
1623 | * * Platforms: T186 | 1669 | * * Platforms: T186, T194 |
1624 | * * Initiators: Any | 1670 | * * Initiators: Any |
1625 | * * Targets: BPMP | 1671 | * * Targets: BPMP |
1626 | * * Request Payload: @ref mrq_abi_ratchet_request | 1672 | * * Request Payload: @ref mrq_abi_ratchet_request |
@@ -1630,7 +1676,7 @@ struct cpu_vhint_data { | |||
1630 | */ | 1676 | */ |
1631 | 1677 | ||
1632 | /** | 1678 | /** |
1633 | * @brief an ABI compatibility mechanism | 1679 | * @brief An ABI compatibility mechanism |
1634 | * | 1680 | * |
1635 | * BPMP_ABI_RATCHET_VALUE may increase for various reasons in a future | 1681 | * BPMP_ABI_RATCHET_VALUE may increase for various reasons in a future |
1636 | * revision of this header file. | 1682 | * revision of this header file. |
@@ -1644,7 +1690,7 @@ struct cpu_vhint_data { | |||
1644 | #define BPMP_ABI_RATCHET_VALUE 3 | 1690 | #define BPMP_ABI_RATCHET_VALUE 3 |
1645 | 1691 | ||
1646 | /** | 1692 | /** |
1647 | * @brief request with #MRQ_ABI_RATCHET. | 1693 | * @brief Request with #MRQ_ABI_RATCHET. |
1648 | * | 1694 | * |
1649 | * #ratchet should be #BPMP_ABI_RATCHET_VALUE from the ABI header | 1695 | * #ratchet should be #BPMP_ABI_RATCHET_VALUE from the ABI header |
1650 | * against which the requester was compiled. | 1696 | * against which the requester was compiled. |
@@ -1657,12 +1703,12 @@ struct cpu_vhint_data { | |||
1657 | * Otherwise, err shall be 0. | 1703 | * Otherwise, err shall be 0. |
1658 | */ | 1704 | */ |
1659 | struct mrq_abi_ratchet_request { | 1705 | struct mrq_abi_ratchet_request { |
1660 | /** @brief requester's ratchet value */ | 1706 | /** @brief Requester's ratchet value */ |
1661 | uint16_t ratchet; | 1707 | uint16_t ratchet; |
1662 | }; | 1708 | }; |
1663 | 1709 | ||
1664 | /** | 1710 | /** |
1665 | * @brief response to #MRQ_ABI_RATCHET | 1711 | * @brief Response to #MRQ_ABI_RATCHET |
1666 | * | 1712 | * |
1667 | * #ratchet shall be #BPMP_ABI_RATCHET_VALUE from the ABI header | 1713 | * #ratchet shall be #BPMP_ABI_RATCHET_VALUE from the ABI header |
1668 | * against which BPMP firwmare was compiled. | 1714 | * against which BPMP firwmare was compiled. |
@@ -1685,9 +1731,9 @@ struct mrq_abi_ratchet_response { | |||
1685 | /** | 1731 | /** |
1686 | * @ingroup MRQ_Codes | 1732 | * @ingroup MRQ_Codes |
1687 | * @def MRQ_EMC_DVFS_LATENCY | 1733 | * @def MRQ_EMC_DVFS_LATENCY |
1688 | * @brief query frequency dependent EMC DVFS latency | 1734 | * @brief Query frequency dependent EMC DVFS latency |
1689 | * | 1735 | * |
1690 | * * Platforms: T186 | 1736 | * * Platforms: T186, T194 |
1691 | * * Initiators: CCPLEX | 1737 | * * Initiators: CCPLEX |
1692 | * * Targets: BPMP | 1738 | * * Targets: BPMP |
1693 | * * Request Payload: N/A | 1739 | * * Request Payload: N/A |
@@ -1697,7 +1743,7 @@ struct mrq_abi_ratchet_response { | |||
1697 | */ | 1743 | */ |
1698 | 1744 | ||
1699 | /** | 1745 | /** |
1700 | * @brief used by @ref mrq_emc_dvfs_latency_response | 1746 | * @brief Used by @ref mrq_emc_dvfs_latency_response |
1701 | */ | 1747 | */ |
1702 | struct emc_dvfs_latency { | 1748 | struct emc_dvfs_latency { |
1703 | /** @brief EMC frequency in kHz */ | 1749 | /** @brief EMC frequency in kHz */ |
@@ -1708,10 +1754,10 @@ struct emc_dvfs_latency { | |||
1708 | 1754 | ||
1709 | #define EMC_DVFS_LATENCY_MAX_SIZE 14 | 1755 | #define EMC_DVFS_LATENCY_MAX_SIZE 14 |
1710 | /** | 1756 | /** |
1711 | * @brief response to #MRQ_EMC_DVFS_LATENCY | 1757 | * @brief Response to #MRQ_EMC_DVFS_LATENCY |
1712 | */ | 1758 | */ |
1713 | struct mrq_emc_dvfs_latency_response { | 1759 | struct mrq_emc_dvfs_latency_response { |
1714 | /** @brief the number valid entries in #pairs */ | 1760 | /** @brief The number valid entries in #pairs */ |
1715 | uint32_t num_pairs; | 1761 | uint32_t num_pairs; |
1716 | /** @brief EMC <frequency, latency> information */ | 1762 | /** @brief EMC <frequency, latency> information */ |
1717 | struct emc_dvfs_latency pairs[EMC_DVFS_LATENCY_MAX_SIZE]; | 1763 | struct emc_dvfs_latency pairs[EMC_DVFS_LATENCY_MAX_SIZE]; |
@@ -1721,8 +1767,96 @@ struct mrq_emc_dvfs_latency_response { | |||
1721 | 1767 | ||
1722 | /** | 1768 | /** |
1723 | * @ingroup MRQ_Codes | 1769 | * @ingroup MRQ_Codes |
1770 | * @def MRQ_CPU_NDIV_LIMITS | ||
1771 | * @brief CPU freq. limits in ndiv | ||
1772 | * | ||
1773 | * * Platforms: T194 onwards | ||
1774 | * @cond bpmp_t194 | ||
1775 | * * Initiators: CCPLEX | ||
1776 | * * Targets: BPMP | ||
1777 | * * Request Payload: @ref mrq_cpu_ndiv_limits_request | ||
1778 | * * Response Payload: @ref mrq_cpu_ndiv_limits_response | ||
1779 | * @addtogroup CPU | ||
1780 | * @{ | ||
1781 | */ | ||
1782 | |||
1783 | /** | ||
1784 | * @brief Request for ndiv limits of a cluster | ||
1785 | */ | ||
1786 | struct mrq_cpu_ndiv_limits_request { | ||
1787 | /** @brief Enum cluster_id */ | ||
1788 | uint32_t cluster_id; | ||
1789 | } __ABI_PACKED; | ||
1790 | |||
1791 | /** | ||
1792 | * @brief Response to #MRQ_CPU_NDIV_LIMITS | ||
1793 | */ | ||
1794 | struct mrq_cpu_ndiv_limits_response { | ||
1795 | /** @brief Reference frequency in Hz */ | ||
1796 | uint32_t ref_clk_hz; | ||
1797 | /** @brief Post divider value */ | ||
1798 | uint16_t pdiv; | ||
1799 | /** @brief Input divider value */ | ||
1800 | uint16_t mdiv; | ||
1801 | /** @brief FMAX expressed with max NDIV value */ | ||
1802 | uint16_t ndiv_max; | ||
1803 | /** @brief Minimum allowed NDIV value */ | ||
1804 | uint16_t ndiv_min; | ||
1805 | } __ABI_PACKED; | ||
1806 | |||
1807 | /** @} */ | ||
1808 | /** @endcond */ | ||
1809 | |||
1810 | /** | ||
1811 | * @ingroup MRQ_Codes | ||
1812 | * @def MRQ_CPU_AUTO_CC3 | ||
1813 | * @brief Query CPU cluster auto-CC3 configuration | ||
1814 | * | ||
1815 | * * Platforms: T194 onwards | ||
1816 | * @cond bpmp_t194 | ||
1817 | * * Initiators: CCPLEX | ||
1818 | * * Targets: BPMP | ||
1819 | * * Request Payload: @ref mrq_cpu_auto_cc3_request | ||
1820 | * * Response Payload: @ref mrq_cpu_auto_cc3_response | ||
1821 | * @addtogroup CC3 | ||
1822 | * | ||
1823 | * Queries from BPMP auto-CC3 configuration (allowed/not allowed) for a | ||
1824 | * specified cluster. CCPLEX s/w uses this information to override its own | ||
1825 | * device tree auto-CC3 settings, so that BPMP device tree is a single source of | ||
1826 | * auto-CC3 platform configuration. | ||
1827 | * | ||
1828 | * @{ | ||
1829 | */ | ||
1830 | |||
1831 | /** | ||
1832 | * @brief Request for auto-CC3 configuration of a cluster | ||
1833 | */ | ||
1834 | struct mrq_cpu_auto_cc3_request { | ||
1835 | /** @brief Enum cluster_id (logical cluster id, known to CCPLEX s/w) */ | ||
1836 | uint32_t cluster_id; | ||
1837 | } __ABI_PACKED; | ||
1838 | |||
1839 | /** | ||
1840 | * @brief Response to #MRQ_CPU_AUTO_CC3 | ||
1841 | */ | ||
1842 | struct mrq_cpu_auto_cc3_response { | ||
1843 | /** | ||
1844 | * @brief auto-CC3 configuration | ||
1845 | * | ||
1846 | * - bits[31..10] reserved. | ||
1847 | * - bits[9..1] cc3 ndiv | ||
1848 | * - bit [0] if "1" auto-CC3 is allowed, if "0" auto-CC3 is not allowed | ||
1849 | */ | ||
1850 | uint32_t auto_cc3_config; | ||
1851 | } __ABI_PACKED; | ||
1852 | |||
1853 | /** @} */ | ||
1854 | /** @endcond */ | ||
1855 | |||
1856 | /** | ||
1857 | * @ingroup MRQ_Codes | ||
1724 | * @def MRQ_TRACE_ITER | 1858 | * @def MRQ_TRACE_ITER |
1725 | * @brief manage the trace iterator | 1859 | * @brief Manage the trace iterator |
1726 | * | 1860 | * |
1727 | * * Platforms: All | 1861 | * * Platforms: All |
1728 | * * Initiators: CCPLEX | 1862 | * * Initiators: CCPLEX |
@@ -1735,12 +1869,12 @@ struct mrq_emc_dvfs_latency_response { | |||
1735 | enum { | 1869 | enum { |
1736 | /** @brief (re)start the tracing now. Ignore older events */ | 1870 | /** @brief (re)start the tracing now. Ignore older events */ |
1737 | TRACE_ITER_INIT = 0, | 1871 | TRACE_ITER_INIT = 0, |
1738 | /** @brief clobber all events in the trace buffer */ | 1872 | /** @brief Clobber all events in the trace buffer */ |
1739 | TRACE_ITER_CLEAN = 1 | 1873 | TRACE_ITER_CLEAN = 1 |
1740 | }; | 1874 | }; |
1741 | 1875 | ||
1742 | /** | 1876 | /** |
1743 | * @brief request with #MRQ_TRACE_ITER | 1877 | * @brief Request with #MRQ_TRACE_ITER |
1744 | */ | 1878 | */ |
1745 | struct mrq_trace_iter_request { | 1879 | struct mrq_trace_iter_request { |
1746 | /** @brief TRACE_ITER_INIT or TRACE_ITER_CLEAN */ | 1880 | /** @brief TRACE_ITER_INIT or TRACE_ITER_CLEAN */ |
@@ -1900,7 +2034,7 @@ struct cmd_ringbuf_console_get_fifo_resp { | |||
1900 | */ | 2034 | */ |
1901 | struct mrq_ringbuf_console_host_to_bpmp_request { | 2035 | struct mrq_ringbuf_console_host_to_bpmp_request { |
1902 | /** | 2036 | /** |
1903 | * @brief type of request. Values listed in enum | 2037 | * @brief Type of request. Values listed in enum |
1904 | * #mrq_ringbuf_console_host_to_bpmp_cmd. | 2038 | * #mrq_ringbuf_console_host_to_bpmp_cmd. |
1905 | */ | 2039 | */ |
1906 | uint32_t type; | 2040 | uint32_t type; |
@@ -1927,49 +2061,616 @@ union mrq_ringbuf_console_bpmp_to_host_response { | |||
1927 | } __ABI_PACKED; | 2061 | } __ABI_PACKED; |
1928 | /** @} */ | 2062 | /** @} */ |
1929 | 2063 | ||
1930 | /* | 2064 | /** |
1931 | * 4. Enumerations | 2065 | * @ingroup MRQ_Codes |
2066 | * @def MRQ_STRAP | ||
2067 | * @brief Set a strap value controlled by BPMP | ||
2068 | * | ||
2069 | * * Platforms: T194 onwards | ||
2070 | * @cond bpmp_t194 | ||
2071 | * * Initiators: CCPLEX | ||
2072 | * * Targets: BPMP | ||
2073 | * * Request Payload: @ref mrq_strap_request | ||
2074 | * * Response Payload: N/A | ||
2075 | * @addtogroup Strap | ||
2076 | * | ||
2077 | * A strap is an input that is sampled by a hardware unit during the | ||
2078 | * unit's startup process. The sampled value of a strap affects the | ||
2079 | * behavior of the unit until the unit is restarted. Many hardware | ||
2080 | * units sample their straps at the instant that their resets are | ||
2081 | * deasserted. | ||
2082 | * | ||
2083 | * BPMP owns registers which act as straps to various units. It | ||
2084 | * exposes limited control of those straps via #MRQ_STRAP. | ||
2085 | * | ||
2086 | * @{ | ||
1932 | */ | 2087 | */ |
2088 | enum mrq_strap_cmd { | ||
2089 | /** @private */ | ||
2090 | STRAP_RESERVED = 0, | ||
2091 | /** @brief Set a strap value */ | ||
2092 | STRAP_SET = 1 | ||
2093 | }; | ||
1933 | 2094 | ||
1934 | /* | 2095 | /** |
1935 | * 4.1 CPU enumerations | 2096 | * @brief Request with #MRQ_STRAP |
2097 | */ | ||
2098 | struct mrq_strap_request { | ||
2099 | /** @brief @ref mrq_strap_cmd */ | ||
2100 | uint32_t cmd; | ||
2101 | /** @brief Strap ID from @ref Strap_Ids */ | ||
2102 | uint32_t id; | ||
2103 | /** @brief Desired value for strap (if cmd is #STRAP_SET) */ | ||
2104 | uint32_t value; | ||
2105 | } __ABI_PACKED; | ||
2106 | |||
2107 | /** | ||
2108 | * @defgroup Strap_Ids Strap Identifiers | ||
2109 | * @} | ||
2110 | */ | ||
2111 | /** @endcond */ | ||
2112 | |||
2113 | /** | ||
2114 | * @ingroup MRQ_Codes | ||
2115 | * @def MRQ_UPHY | ||
2116 | * @brief Perform a UPHY operation | ||
1936 | * | 2117 | * |
1937 | * See <mach-t186/system-t186.h> | 2118 | * * Platforms: T194 onwards |
2119 | * @cond bpmp_t194 | ||
2120 | * * Initiators: CCPLEX | ||
2121 | * * Targets: BPMP | ||
2122 | * * Request Payload: @ref mrq_uphy_request | ||
2123 | * * Response Payload: @ref mrq_uphy_response | ||
1938 | * | 2124 | * |
1939 | * 4.2 CPU Cluster enumerations | 2125 | * @addtogroup UPHY |
2126 | * @{ | ||
2127 | */ | ||
2128 | enum { | ||
2129 | CMD_UPHY_PCIE_LANE_MARGIN_CONTROL = 1, | ||
2130 | CMD_UPHY_PCIE_LANE_MARGIN_STATUS = 2, | ||
2131 | CMD_UPHY_PCIE_EP_CONTROLLER_PLL_INIT = 3, | ||
2132 | CMD_UPHY_PCIE_CONTROLLER_STATE = 4, | ||
2133 | CMD_UPHY_MAX, | ||
2134 | }; | ||
2135 | |||
2136 | struct cmd_uphy_margin_control_request { | ||
2137 | /** @brief Enable margin */ | ||
2138 | int32_t en; | ||
2139 | /** @brief Clear the number of error and sections */ | ||
2140 | int32_t clr; | ||
2141 | /** @brief Set x offset (1's complement) for left/right margin type (y should be 0) */ | ||
2142 | uint32_t x; | ||
2143 | /** @brief Set y offset (1's complement) for left/right margin type (x should be 0) */ | ||
2144 | uint32_t y; | ||
2145 | /** @brief Set number of bit blocks for each margin section */ | ||
2146 | uint32_t nblks; | ||
2147 | } __ABI_PACKED; | ||
2148 | |||
2149 | struct cmd_uphy_margin_status_response { | ||
2150 | /** @brief Number of errors observed */ | ||
2151 | uint32_t status; | ||
2152 | } __ABI_PACKED; | ||
2153 | |||
2154 | struct cmd_uphy_ep_controller_pll_init_request { | ||
2155 | /** @brief EP controller number, valid: 0, 4, 5 */ | ||
2156 | uint8_t ep_controller; | ||
2157 | } __ABI_PACKED; | ||
2158 | |||
2159 | struct cmd_uphy_pcie_controller_state_request { | ||
2160 | /** @brief PCIE controller number, valid: 0, 1, 2, 3, 4 */ | ||
2161 | uint8_t pcie_controller; | ||
2162 | uint8_t enable; | ||
2163 | } __ABI_PACKED; | ||
2164 | |||
2165 | /** | ||
2166 | * @ingroup UPHY | ||
2167 | * @brief Request with #MRQ_UPHY | ||
1940 | * | 2168 | * |
1941 | * See <mach-t186/system-t186.h> | 2169 | * Used by the sender of an #MRQ_UPHY message to control UPHY Lane RX margining. |
2170 | * The uphy_request is split into several sub-commands. Some sub-commands | ||
2171 | * require no additional data. Others have a sub-command specific payload | ||
1942 | * | 2172 | * |
1943 | * 4.3 System low power state enumerations | 2173 | * |sub-command |payload | |
2174 | * |------------------------------------ |----------------------------------------| | ||
2175 | * |CMD_UPHY_PCIE_LANE_MARGIN_CONTROL |uphy_set_margin_control | | ||
2176 | * |CMD_UPHY_PCIE_LANE_MARGIN_STATUS | | | ||
2177 | * |CMD_UPHY_PCIE_EP_CONTROLLER_PLL_INIT |cmd_uphy_ep_controller_pll_init_request | | ||
2178 | * |CMD_UPHY_PCIE_CONTROLLER_STATE |cmd_uphy_pcie_controller_state_request | | ||
1944 | * | 2179 | * |
1945 | * See <mach-t186/system-t186.h> | ||
1946 | */ | 2180 | */ |
1947 | 2181 | ||
1948 | /* | 2182 | struct mrq_uphy_request { |
1949 | * 4.4 Clock enumerations | 2183 | /** @brief Lane number. */ |
2184 | uint16_t lane; | ||
2185 | /** @brief Sub-command id. */ | ||
2186 | uint16_t cmd; | ||
2187 | |||
2188 | union { | ||
2189 | struct cmd_uphy_margin_control_request uphy_set_margin_control; | ||
2190 | struct cmd_uphy_ep_controller_pll_init_request ep_ctrlr_pll_init; | ||
2191 | struct cmd_uphy_pcie_controller_state_request controller_state; | ||
2192 | } __UNION_ANON; | ||
2193 | } __ABI_PACKED; | ||
2194 | |||
2195 | /** | ||
2196 | * @ingroup UPHY | ||
2197 | * @brief Response to MRQ_UPHY | ||
2198 | * | ||
2199 | * Each sub-command supported by @ref mrq_uphy_request may return | ||
2200 | * sub-command-specific data. Some do and some do not as indicated in | ||
2201 | * the following table | ||
2202 | * | ||
2203 | * |sub-command |payload | | ||
2204 | * |---------------------------- |------------------------| | ||
2205 | * |CMD_UPHY_PCIE_LANE_MARGIN_CONTROL | | | ||
2206 | * |CMD_UPHY_PCIE_LANE_MARGIN_STATUS |uphy_get_margin_status | | ||
1950 | * | 2207 | * |
1951 | * For clock enumerations, see <mach-t186/clk-t186.h> | ||
1952 | */ | 2208 | */ |
1953 | 2209 | ||
1954 | /* | 2210 | struct mrq_uphy_response { |
1955 | * 4.5 Reset enumerations | 2211 | union { |
2212 | struct cmd_uphy_margin_status_response uphy_get_margin_status; | ||
2213 | } __UNION_ANON; | ||
2214 | } __ABI_PACKED; | ||
2215 | |||
2216 | /** @} */ | ||
2217 | /** @endcond */ | ||
2218 | |||
2219 | /** | ||
2220 | * @ingroup MRQ_Codes | ||
2221 | * @def MRQ_FMON | ||
2222 | * @brief Perform a frequency monitor configuration operations | ||
2223 | * | ||
2224 | * * Platforms: T194 onwards | ||
2225 | * @cond bpmp_t194 | ||
2226 | * * Initiators: CCPLEX | ||
2227 | * * Targets: BPMP | ||
2228 | * * Request Payload: @ref mrq_fmon_request | ||
2229 | * * Response Payload: @ref mrq_fmon_response | ||
1956 | * | 2230 | * |
1957 | * For reset enumerations, see <mach-t186/reset-t186.h> | 2231 | * @addtogroup FMON |
2232 | * @{ | ||
1958 | */ | 2233 | */ |
2234 | enum { | ||
2235 | /** | ||
2236 | * @brief Clamp FMON configuration to specified rate. | ||
2237 | * | ||
2238 | * The monitored clock must be running for clamp to succeed. If | ||
2239 | * clamped, FMON configuration is preserved when clock rate | ||
2240 | * and/or state is changed. | ||
2241 | */ | ||
2242 | CMD_FMON_GEAR_CLAMP = 1, | ||
2243 | /** | ||
2244 | * @brief Release clamped FMON configuration. | ||
2245 | * | ||
2246 | * Allow FMON configuration to follow monitored clock rate | ||
2247 | * and/or state changes. | ||
2248 | */ | ||
2249 | CMD_FMON_GEAR_FREE = 2, | ||
2250 | /** | ||
2251 | * @brief Return rate FMON is clamped at, or 0 if FMON is not | ||
2252 | * clamped. | ||
2253 | * | ||
2254 | * Inherently racy, since clamp state can be changed | ||
2255 | * concurrently. Useful for testing. | ||
2256 | */ | ||
2257 | CMD_FMON_GEAR_GET = 3, | ||
2258 | CMD_FMON_NUM, | ||
2259 | }; | ||
1959 | 2260 | ||
1960 | /* | 2261 | struct cmd_fmon_gear_clamp_request { |
1961 | * 4.6 Thermal sensor enumerations | 2262 | int32_t unused; |
2263 | int64_t rate; | ||
2264 | } __ABI_PACKED; | ||
2265 | |||
2266 | /** @private */ | ||
2267 | struct cmd_fmon_gear_clamp_response { | ||
2268 | EMPTY | ||
2269 | } __ABI_PACKED; | ||
2270 | |||
2271 | /** @private */ | ||
2272 | struct cmd_fmon_gear_free_request { | ||
2273 | EMPTY | ||
2274 | } __ABI_PACKED; | ||
2275 | |||
2276 | /** @private */ | ||
2277 | struct cmd_fmon_gear_free_response { | ||
2278 | EMPTY | ||
2279 | } __ABI_PACKED; | ||
2280 | |||
2281 | /** @private */ | ||
2282 | struct cmd_fmon_gear_get_request { | ||
2283 | EMPTY | ||
2284 | } __ABI_PACKED; | ||
2285 | |||
2286 | struct cmd_fmon_gear_get_response { | ||
2287 | int64_t rate; | ||
2288 | } __ABI_PACKED; | ||
2289 | |||
2290 | /** | ||
2291 | * @ingroup FMON | ||
2292 | * @brief Request with #MRQ_FMON | ||
2293 | * | ||
2294 | * Used by the sender of an #MRQ_FMON message to configure clock | ||
2295 | * frequency monitors. The FMON request is split into several | ||
2296 | * sub-commands. Some sub-commands require no additional data. | ||
2297 | * Others have a sub-command specific payload | ||
2298 | * | ||
2299 | * |sub-command |payload | | ||
2300 | * |----------------------------|-----------------------| | ||
2301 | * |CMD_FMON_GEAR_CLAMP |fmon_gear_clamp | | ||
2302 | * |CMD_FMON_GEAR_FREE |- | | ||
2303 | * |CMD_FMON_GEAR_GET |- | | ||
2304 | * | ||
2305 | */ | ||
2306 | |||
2307 | struct mrq_fmon_request { | ||
2308 | /** @brief Sub-command and clock id concatenated to 32-bit word. | ||
2309 | * - bits[31..24] is the sub-cmd. | ||
2310 | * - bits[23..0] is monitored clock id used to select target | ||
2311 | * FMON | ||
2312 | */ | ||
2313 | uint32_t cmd_and_id; | ||
2314 | |||
2315 | union { | ||
2316 | struct cmd_fmon_gear_clamp_request fmon_gear_clamp; | ||
2317 | /** @private */ | ||
2318 | struct cmd_fmon_gear_free_request fmon_gear_free; | ||
2319 | /** @private */ | ||
2320 | struct cmd_fmon_gear_get_request fmon_gear_get; | ||
2321 | } __UNION_ANON; | ||
2322 | } __ABI_PACKED; | ||
2323 | |||
2324 | /** | ||
2325 | * @ingroup FMON | ||
2326 | * @brief Response to MRQ_FMON | ||
2327 | * | ||
2328 | * Each sub-command supported by @ref mrq_fmon_request may | ||
2329 | * return sub-command-specific data as indicated below. | ||
2330 | * | ||
2331 | * |sub-command |payload | | ||
2332 | * |----------------------------|------------------------| | ||
2333 | * |CMD_FMON_GEAR_CLAMP |- | | ||
2334 | * |CMD_FMON_GEAR_FREE |- | | ||
2335 | * |CMD_FMON_GEAR_GET |fmon_gear_get | | ||
2336 | * | ||
2337 | */ | ||
2338 | |||
2339 | struct mrq_fmon_response { | ||
2340 | union { | ||
2341 | /** @private */ | ||
2342 | struct cmd_fmon_gear_clamp_response fmon_gear_clamp; | ||
2343 | /** @private */ | ||
2344 | struct cmd_fmon_gear_free_response fmon_gear_free; | ||
2345 | struct cmd_fmon_gear_get_response fmon_gear_get; | ||
2346 | } __UNION_ANON; | ||
2347 | } __ABI_PACKED; | ||
2348 | |||
2349 | /** @} */ | ||
2350 | /** @endcond */ | ||
2351 | |||
2352 | /** | ||
2353 | * @ingroup MRQ_Codes | ||
2354 | * @def MRQ_EC | ||
2355 | * @brief Provide status information on faults reported by Error | ||
2356 | * Collator (EC) to HSM. | ||
2357 | * | ||
2358 | * * Platforms: T194 onwards | ||
2359 | * @cond bpmp_t194 | ||
2360 | * * Initiators: CCPLEX | ||
2361 | * * Targets: BPMP | ||
2362 | * * Request Payload: @ref mrq_ec_request | ||
2363 | * * Response Payload: @ref mrq_ec_response | ||
2364 | * | ||
2365 | * @note This MRQ ABI is under construction, and subject to change | ||
2366 | * | ||
2367 | * @addtogroup EC | ||
2368 | * @{ | ||
2369 | */ | ||
2370 | enum { | ||
2371 | /** | ||
2372 | * @brief Retrieve specified EC status. | ||
2373 | * | ||
2374 | * mrq_response::err is 0 if the operation was successful, or @n | ||
2375 | * -#BPMP_ENODEV if target EC is not owned by BPMP @n | ||
2376 | * -#BPMP_EACCES if target EC power domain is turned off | ||
2377 | */ | ||
2378 | CMD_EC_STATUS_GET = 1, | ||
2379 | CMD_EC_NUM, | ||
2380 | }; | ||
2381 | |||
2382 | /** @brief BPMP ECs error types */ | ||
2383 | enum bpmp_ec_err_type { | ||
2384 | /** @brief Parity error on internal data path | ||
2385 | * | ||
2386 | * Error descriptor @ref ec_err_simple_desc. | ||
2387 | */ | ||
2388 | EC_ERR_TYPE_PARITY_INTERNAL = 1, | ||
2389 | |||
2390 | /** @brief ECC SEC error on internal data path | ||
2391 | * | ||
2392 | * Error descriptor @ref ec_err_simple_desc. | ||
2393 | */ | ||
2394 | EC_ERR_TYPE_ECC_SEC_INTERNAL = 2, | ||
2395 | |||
2396 | /** @brief ECC DED error on internal data path | ||
2397 | * | ||
2398 | * Error descriptor @ref ec_err_simple_desc. | ||
2399 | */ | ||
2400 | EC_ERR_TYPE_ECC_DED_INTERNAL = 3, | ||
2401 | |||
2402 | /** @brief Comparator error | ||
2403 | * | ||
2404 | * Error descriptor @ref ec_err_simple_desc. | ||
2405 | */ | ||
2406 | EC_ERR_TYPE_COMPARATOR = 4, | ||
2407 | |||
2408 | /** @brief Register parity error | ||
2409 | * | ||
2410 | * Error descriptor @ref ec_err_reg_parity_desc. | ||
2411 | */ | ||
2412 | EC_ERR_TYPE_REGISTER_PARITY = 5, | ||
2413 | |||
2414 | /** @brief Parity error from on-chip SRAM/FIFO | ||
2415 | * | ||
2416 | * Error descriptor @ref ec_err_simple_desc. | ||
2417 | */ | ||
2418 | EC_ERR_TYPE_PARITY_SRAM = 6, | ||
2419 | |||
2420 | /** @brief Clock Monitor error | ||
2421 | * | ||
2422 | * Error descriptor @ref ec_err_fmon_desc. | ||
2423 | */ | ||
2424 | EC_ERR_TYPE_CLOCK_MONITOR = 9, | ||
2425 | |||
2426 | /** @brief Voltage Monitor error | ||
2427 | * | ||
2428 | * Error descriptor @ref ec_err_vmon_desc. | ||
2429 | */ | ||
2430 | EC_ERR_TYPE_VOLTAGE_MONITOR = 10, | ||
2431 | |||
2432 | /** @brief SW Correctable error | ||
2433 | * | ||
2434 | * Error descriptor @ref ec_err_simple_desc. | ||
2435 | */ | ||
2436 | EC_ERR_TYPE_SW_CORRECTABLE = 16, | ||
2437 | |||
2438 | /** @brief SW Uncorrectable error | ||
2439 | * | ||
2440 | * Error descriptor @ref ec_err_simple_desc. | ||
2441 | */ | ||
2442 | EC_ERR_TYPE_SW_UNCORRECTABLE = 17, | ||
2443 | |||
2444 | /** @brief Other HW Correctable error | ||
2445 | * | ||
2446 | * Error descriptor @ref ec_err_simple_desc. | ||
2447 | */ | ||
2448 | EC_ERR_TYPE_OTHER_HW_CORRECTABLE = 32, | ||
2449 | |||
2450 | /** @brief Other HW Uncorrectable error | ||
2451 | * | ||
2452 | * Error descriptor @ref ec_err_simple_desc. | ||
2453 | */ | ||
2454 | EC_ERR_TYPE_OTHER_HW_UNCORRECTABLE = 33, | ||
2455 | }; | ||
2456 | |||
2457 | /** @brief Group of registers with parity error. */ | ||
2458 | enum ec_registers_group { | ||
2459 | /** @brief Functional registers group */ | ||
2460 | EC_ERR_GROUP_FUNC_REG = 0, | ||
2461 | /** @brief SCR registers group */ | ||
2462 | EC_ERR_GROUP_SCR_REG = 1, | ||
2463 | }; | ||
2464 | |||
2465 | /** | ||
2466 | * @defgroup bpmp_ec_status_flags EC Status Flags | ||
2467 | * @addtogroup bpmp_ec_status_flags | ||
2468 | * @{ | ||
2469 | */ | ||
2470 | /** @brief No EC error found flag */ | ||
2471 | #define EC_STATUS_FLAG_NO_ERROR 0x0001 | ||
2472 | /** @brief Last EC error found flag */ | ||
2473 | #define EC_STATUS_FLAG_LAST_ERROR 0x0002 | ||
2474 | /** @brief EC latent error flag */ | ||
2475 | #define EC_STATUS_FLAG_LATENT_ERROR 0x0004 | ||
2476 | /** @} */ | ||
2477 | |||
2478 | /** | ||
2479 | * @defgroup bpmp_ec_desc_flags EC Descriptor Flags | ||
2480 | * @addtogroup bpmp_ec_desc_flags | ||
2481 | * @{ | ||
2482 | */ | ||
2483 | /** @brief EC descriptor error resolved flag */ | ||
2484 | #define EC_DESC_FLAG_RESOLVED 0x0001 | ||
2485 | /** @brief EC descriptor failed to retrieve id flag */ | ||
2486 | #define EC_DESC_FLAG_NO_ID 0x0002 | ||
2487 | /** @} */ | ||
2488 | |||
2489 | /** | ||
2490 | * |error type | fmon_clk_id values | | ||
2491 | * |---------------------------------|---------------------------| | ||
2492 | * |@ref EC_ERR_TYPE_CLOCK_MONITOR |@ref bpmp_clock_ids | | ||
2493 | */ | ||
2494 | struct ec_err_fmon_desc { | ||
2495 | /** @brief Bitmask of @ref bpmp_ec_desc_flags */ | ||
2496 | uint16_t desc_flags; | ||
2497 | /** @brief FMON monitored clock id */ | ||
2498 | uint16_t fmon_clk_id; | ||
2499 | /** @brief Bitmask of @ref bpmp_fmon_faults_flags */ | ||
2500 | uint32_t fmon_faults; | ||
2501 | /** @brief FMON faults access error */ | ||
2502 | int32_t fmon_access_error; | ||
2503 | } __ABI_PACKED; | ||
2504 | |||
2505 | /** | ||
2506 | * |error type | vmon_adc_id values | | ||
2507 | * |---------------------------------|---------------------------| | ||
2508 | * |@ref EC_ERR_TYPE_VOLTAGE_MONITOR |@ref bpmp_adc_ids | | ||
2509 | */ | ||
2510 | struct ec_err_vmon_desc { | ||
2511 | /** @brief Bitmask of @ref bpmp_ec_desc_flags */ | ||
2512 | uint16_t desc_flags; | ||
2513 | /** @brief VMON rail adc id */ | ||
2514 | uint16_t vmon_adc_id; | ||
2515 | /** @brief Bitmask of @ref bpmp_vmon_faults_flags */ | ||
2516 | uint32_t vmon_faults; | ||
2517 | /** @brief VMON faults access error */ | ||
2518 | int32_t vmon_access_error; | ||
2519 | } __ABI_PACKED; | ||
2520 | |||
2521 | /** | ||
2522 | * |error type | reg_id values | | ||
2523 | * |---------------------------------|---------------------------| | ||
2524 | * |@ref EC_ERR_TYPE_REGISTER_PARITY |@ref bpmp_ec_registers_ids | | ||
2525 | */ | ||
2526 | struct ec_err_reg_parity_desc { | ||
2527 | /** @brief Bitmask of @ref bpmp_ec_desc_flags */ | ||
2528 | uint16_t desc_flags; | ||
2529 | /** @brief Register id */ | ||
2530 | uint16_t reg_id; | ||
2531 | /** @brief Register group @ref ec_registers_group */ | ||
2532 | uint16_t reg_group; | ||
2533 | } __ABI_PACKED; | ||
2534 | |||
2535 | /** | ||
2536 | * |error type | err_source_id values | | ||
2537 | * |----------------------------------------|---------------------------| | ||
2538 | * |@ref EC_ERR_TYPE_PARITY_INTERNAL |@ref bpmp_ec_ipath_ids | | ||
2539 | * |@ref EC_ERR_TYPE_ECC_SEC_INTERNAL |@ref bpmp_ec_ipath_ids | | ||
2540 | * |@ref EC_ERR_TYPE_ECC_DED_INTERNAL |@ref bpmp_ec_ipath_ids | | ||
2541 | * |@ref EC_ERR_TYPE_COMPARATOR |@ref bpmp_ec_comparator_ids| | ||
2542 | * |@ref EC_ERR_TYPE_PARITY_SRAM |@ref bpmp_clock_ids | | ||
2543 | * |@ref EC_ERR_TYPE_SW_CORRECTABLE |@ref bpmp_ec_misc_ids | | ||
2544 | * |@ref EC_ERR_TYPE_SW_UNCORRECTABLE |@ref bpmp_ec_misc_ids | | ||
2545 | * |@ref EC_ERR_TYPE_OTHER_HW_CORRECTABLE |@ref bpmp_ec_misc_ids | | ||
2546 | * |@ref EC_ERR_TYPE_OTHER_HW_UNCORRECTABLE |@ref bpmp_ec_misc_ids | | ||
2547 | */ | ||
2548 | struct ec_err_simple_desc { | ||
2549 | /** @brief Bitmask of @ref bpmp_ec_desc_flags */ | ||
2550 | uint16_t desc_flags; | ||
2551 | /** @brief Error source id. Id space depends on error type. */ | ||
2552 | uint16_t err_source_id; | ||
2553 | } __ABI_PACKED; | ||
2554 | |||
2555 | /** @brief Union of EC error descriptors */ | ||
2556 | union ec_err_desc { | ||
2557 | struct ec_err_fmon_desc fmon_desc; | ||
2558 | struct ec_err_vmon_desc vmon_desc; | ||
2559 | struct ec_err_reg_parity_desc reg_parity_desc; | ||
2560 | struct ec_err_simple_desc simple_desc; | ||
2561 | } __ABI_PACKED; | ||
2562 | |||
2563 | struct cmd_ec_status_get_request { | ||
2564 | /** @brief HSM error line number that identifies target EC. */ | ||
2565 | uint32_t ec_hsm_id; | ||
2566 | } __ABI_PACKED; | ||
2567 | |||
2568 | /** EC status maximum number of descriptors */ | ||
2569 | #define EC_ERR_STATUS_DESC_MAX_NUM 4 | ||
2570 | |||
2571 | struct cmd_ec_status_get_response { | ||
2572 | /** @brief Target EC id (the same id received with request). */ | ||
2573 | uint32_t ec_hsm_id; | ||
2574 | /** | ||
2575 | * @brief Bitmask of @ref bpmp_ec_status_flags | ||
2576 | * | ||
2577 | * If NO_ERROR flag is set, error_ fields should be ignored | ||
2578 | */ | ||
2579 | uint32_t ec_status_flags; | ||
2580 | /** @brief Found EC error index. */ | ||
2581 | uint32_t error_idx; | ||
2582 | /** @brief Found EC error type @ref bpmp_ec_err_type. */ | ||
2583 | uint32_t error_type; | ||
2584 | /** @brief Number of returned EC error descriptors */ | ||
2585 | uint32_t error_desc_num; | ||
2586 | /** @brief EC error descriptors */ | ||
2587 | union ec_err_desc error_descs[EC_ERR_STATUS_DESC_MAX_NUM]; | ||
2588 | } __ABI_PACKED; | ||
2589 | |||
2590 | /** | ||
2591 | * @ingroup EC | ||
2592 | * @brief Request with #MRQ_EC | ||
2593 | * | ||
2594 | * Used by the sender of an #MRQ_EC message to access ECs owned | ||
2595 | * by BPMP. | ||
2596 | * | ||
2597 | * |sub-command |payload | | ||
2598 | * |----------------------------|-----------------------| | ||
2599 | * |@ref CMD_EC_STATUS_GET |ec_status_get | | ||
1962 | * | 2600 | * |
1963 | * For thermal sensor enumerations, see <mach-t186/thermal-t186.h> | ||
1964 | */ | 2601 | */ |
1965 | 2602 | ||
2603 | struct mrq_ec_request { | ||
2604 | /** @brief Sub-command id. */ | ||
2605 | uint32_t cmd_id; | ||
2606 | |||
2607 | union { | ||
2608 | struct cmd_ec_status_get_request ec_status_get; | ||
2609 | } __UNION_ANON; | ||
2610 | } __ABI_PACKED; | ||
2611 | |||
1966 | /** | 2612 | /** |
1967 | * @defgroup Error_Codes | 2613 | * @ingroup EC |
2614 | * @brief Response to MRQ_EC | ||
2615 | * | ||
2616 | * Each sub-command supported by @ref mrq_ec_request may return | ||
2617 | * sub-command-specific data as indicated below. | ||
2618 | * | ||
2619 | * |sub-command |payload | | ||
2620 | * |----------------------------|------------------------| | ||
2621 | * |@ref CMD_EC_STATUS_GET |ec_status_get | | ||
2622 | * | ||
2623 | */ | ||
2624 | |||
2625 | struct mrq_ec_response { | ||
2626 | union { | ||
2627 | struct cmd_ec_status_get_response ec_status_get; | ||
2628 | } __UNION_ANON; | ||
2629 | } __ABI_PACKED; | ||
2630 | |||
2631 | /** @} */ | ||
2632 | /** @endcond */ | ||
2633 | |||
2634 | /** | ||
2635 | * @ingroup MRQ_Codes | ||
2636 | * @def MRQ_FBVOLT_STATUS | ||
2637 | * @brief Provides status information about voltage state for fuse burning | ||
2638 | * | ||
2639 | * * Platforms: T194 onwards | ||
2640 | * @cond bpmp_t194 | ||
2641 | * * Initiators: CCPLEX | ||
2642 | * * Target: BPMP | ||
2643 | * * Request Payload: None | ||
2644 | * * Response Payload: @ref mrq_fbvolt_status_response | ||
2645 | * @{ | ||
2646 | */ | ||
2647 | |||
2648 | /** | ||
2649 | * @ingroup Fbvolt_status | ||
2650 | * @brief Response to #MRQ_FBVOLT_STATUS | ||
2651 | * | ||
2652 | * Value of #ready reflects if core voltages are in a suitable state for buring | ||
2653 | * fuses. A value of 0x1 indicates that core voltages are ready for burning | ||
2654 | * fuses. A value of 0x0 indicates that core voltages are not ready. | ||
2655 | */ | ||
2656 | struct mrq_fbvolt_status_response { | ||
2657 | /** @brief Bit [0:0] - ready status, bits [31:1] - reserved */ | ||
2658 | uint32_t ready; | ||
2659 | /** @brief Reserved */ | ||
2660 | uint32_t unused; | ||
2661 | } __ABI_PACKED; | ||
2662 | |||
2663 | /** @} */ | ||
2664 | /** @endcond */ | ||
2665 | |||
2666 | /** | ||
2667 | * @addtogroup Error_Codes | ||
1968 | * Negative values for mrq_response::err generally indicate some | 2668 | * Negative values for mrq_response::err generally indicate some |
1969 | * error. The ABI defines the following error codes. Negating these | 2669 | * error. The ABI defines the following error codes. Negating these |
1970 | * defines is an exercise left to the user. | 2670 | * defines is an exercise left to the user. |
1971 | * @{ | 2671 | * @{ |
1972 | */ | 2672 | */ |
2673 | |||
1973 | /** @brief No such file or directory */ | 2674 | /** @brief No such file or directory */ |
1974 | #define BPMP_ENOENT 2 | 2675 | #define BPMP_ENOENT 2 |
1975 | /** @brief No MRQ handler */ | 2676 | /** @brief No MRQ handler */ |
@@ -1994,6 +2695,11 @@ union mrq_ringbuf_console_bpmp_to_host_response { | |||
1994 | #define BPMP_ETIMEDOUT 23 | 2695 | #define BPMP_ETIMEDOUT 23 |
1995 | /** @brief Out of range */ | 2696 | /** @brief Out of range */ |
1996 | #define BPMP_ERANGE 34 | 2697 | #define BPMP_ERANGE 34 |
2698 | /** @brief Function not implemented */ | ||
2699 | #define BPMP_ENOSYS 38 | ||
2700 | /** @brief Invalid slot */ | ||
2701 | #define BPMP_EBADSLT 57 | ||
2702 | |||
1997 | /** @} */ | 2703 | /** @} */ |
1998 | /** @} */ | 2704 | |
1999 | #endif | 2705 | #endif |