1 2 /* Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 */ 16 17 18 19 20 21 22 23 24 25 26 #ifndef _UNIFORM_REO_STATUS_HEADER_H_ 27 #define _UNIFORM_REO_STATUS_HEADER_H_ 28 #if !defined(__ASSEMBLER__) 29 #endif 30 31 #define NUM_OF_DWORDS_UNIFORM_REO_STATUS_HEADER 2 32 33 34 struct uniform_reo_status_header { 35 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN 36 uint32_t reo_status_number : 16, // [15:0] 37 cmd_execution_time : 10, // [25:16] 38 reo_cmd_execution_status : 2, // [27:26] 39 reserved_0a : 4; // [31:28] 40 uint32_t timestamp : 32; // [31:0] 41 #else 42 uint32_t reserved_0a : 4, // [31:28] 43 reo_cmd_execution_status : 2, // [27:26] 44 cmd_execution_time : 10, // [25:16] 45 reo_status_number : 16; // [15:0] 46 uint32_t timestamp : 32; // [31:0] 47 #endif 48 }; 49 50 51 /* Description REO_STATUS_NUMBER 52 53 Consumer: SW , DEBUG 54 Producer: REO 55 56 The value in this field is equal to value of the 'REO_CMD_Number' 57 field the REO command 58 59 This field helps to correlate the statuses with the REO 60 commands. 61 62 <legal all> 63 */ 64 65 #define UNIFORM_REO_STATUS_HEADER_REO_STATUS_NUMBER_OFFSET 0x00000000 66 #define UNIFORM_REO_STATUS_HEADER_REO_STATUS_NUMBER_LSB 0 67 #define UNIFORM_REO_STATUS_HEADER_REO_STATUS_NUMBER_MSB 15 68 #define UNIFORM_REO_STATUS_HEADER_REO_STATUS_NUMBER_MASK 0x0000ffff 69 70 71 /* Description CMD_EXECUTION_TIME 72 73 Consumer: DEBUG 74 Producer: REO 75 76 The amount of time REO took to excecute the command. Note 77 that this time does not include the duration of the command 78 waiting in the command ring, before the execution started. 79 80 81 In us. 82 83 <legal all> 84 */ 85 86 #define UNIFORM_REO_STATUS_HEADER_CMD_EXECUTION_TIME_OFFSET 0x00000000 87 #define UNIFORM_REO_STATUS_HEADER_CMD_EXECUTION_TIME_LSB 16 88 #define UNIFORM_REO_STATUS_HEADER_CMD_EXECUTION_TIME_MSB 25 89 #define UNIFORM_REO_STATUS_HEADER_CMD_EXECUTION_TIME_MASK 0x03ff0000 90 91 92 /* Description REO_CMD_EXECUTION_STATUS 93 94 Consumer: DEBUG 95 Producer: REO 96 97 Execution status of the command. 98 99 <enum 0 reo_successful_execution> Command has successfully 100 be executed 101 <enum 1 reo_blocked_execution> Command could not be executed 102 as the queue or cache was blocked 103 <enum 2 reo_failed_execution> Command has encountered problems 104 when executing, like the queue descriptor not being valid. 105 None of the status fields in the entire STATUS TLV are valid. 106 107 <enum 3 reo_resource_blocked> Command is NOT executed because 108 one or more descriptors were blocked. This is SW programming 109 mistake. 110 None of the status fields in the entire STATUS TLV are valid. 111 112 113 <legal 0-3> 114 */ 115 116 #define UNIFORM_REO_STATUS_HEADER_REO_CMD_EXECUTION_STATUS_OFFSET 0x00000000 117 #define UNIFORM_REO_STATUS_HEADER_REO_CMD_EXECUTION_STATUS_LSB 26 118 #define UNIFORM_REO_STATUS_HEADER_REO_CMD_EXECUTION_STATUS_MSB 27 119 #define UNIFORM_REO_STATUS_HEADER_REO_CMD_EXECUTION_STATUS_MASK 0x0c000000 120 121 122 /* Description RESERVED_0A 123 124 <legal 0> 125 */ 126 127 #define UNIFORM_REO_STATUS_HEADER_RESERVED_0A_OFFSET 0x00000000 128 #define UNIFORM_REO_STATUS_HEADER_RESERVED_0A_LSB 28 129 #define UNIFORM_REO_STATUS_HEADER_RESERVED_0A_MSB 31 130 #define UNIFORM_REO_STATUS_HEADER_RESERVED_0A_MASK 0xf0000000 131 132 133 /* Description TIMESTAMP 134 135 Timestamp at the moment that this status report is written. 136 137 138 <legal all> 139 */ 140 141 #define UNIFORM_REO_STATUS_HEADER_TIMESTAMP_OFFSET 0x00000004 142 #define UNIFORM_REO_STATUS_HEADER_TIMESTAMP_LSB 0 143 #define UNIFORM_REO_STATUS_HEADER_TIMESTAMP_MSB 31 144 #define UNIFORM_REO_STATUS_HEADER_TIMESTAMP_MASK 0xffffffff 145 146 147 148 #endif // UNIFORM_REO_STATUS_HEADER 149