1 /* 2 * Copyright (c) 2023 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 #ifndef _UNIFORM_REO_STATUS_HEADER_H_ 18 #define _UNIFORM_REO_STATUS_HEADER_H_ 19 #if !defined(__ASSEMBLER__) 20 #endif 21 22 #define NUM_OF_DWORDS_UNIFORM_REO_STATUS_HEADER 2 23 24 25 struct uniform_reo_status_header { 26 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN 27 uint32_t reo_status_number : 16, // [15:0] 28 cmd_execution_time : 10, // [25:16] 29 reo_cmd_execution_status : 2, // [27:26] 30 reserved_0a : 4; // [31:28] 31 uint32_t timestamp : 32; // [31:0] 32 #else 33 uint32_t reserved_0a : 4, // [31:28] 34 reo_cmd_execution_status : 2, // [27:26] 35 cmd_execution_time : 10, // [25:16] 36 reo_status_number : 16; // [15:0] 37 uint32_t timestamp : 32; // [31:0] 38 #endif 39 }; 40 41 42 /* Description REO_STATUS_NUMBER 43 44 Consumer: SW , DEBUG 45 Producer: REO 46 47 The value in this field is equal to value of the 'REO_CMD_Number' 48 field the REO command 49 50 This field helps to correlate the statuses with the REO 51 commands. 52 53 <legal all> 54 */ 55 56 #define UNIFORM_REO_STATUS_HEADER_REO_STATUS_NUMBER_OFFSET 0x00000000 57 #define UNIFORM_REO_STATUS_HEADER_REO_STATUS_NUMBER_LSB 0 58 #define UNIFORM_REO_STATUS_HEADER_REO_STATUS_NUMBER_MSB 15 59 #define UNIFORM_REO_STATUS_HEADER_REO_STATUS_NUMBER_MASK 0x0000ffff 60 61 62 /* Description CMD_EXECUTION_TIME 63 64 Consumer: DEBUG 65 Producer: REO 66 67 The amount of time REO took to excecute the command. Note 68 that this time does not include the duration of the command 69 waiting in the command ring, before the execution started. 70 71 72 In us. 73 74 <legal all> 75 */ 76 77 #define UNIFORM_REO_STATUS_HEADER_CMD_EXECUTION_TIME_OFFSET 0x00000000 78 #define UNIFORM_REO_STATUS_HEADER_CMD_EXECUTION_TIME_LSB 16 79 #define UNIFORM_REO_STATUS_HEADER_CMD_EXECUTION_TIME_MSB 25 80 #define UNIFORM_REO_STATUS_HEADER_CMD_EXECUTION_TIME_MASK 0x03ff0000 81 82 83 /* Description REO_CMD_EXECUTION_STATUS 84 85 Consumer: DEBUG 86 Producer: REO 87 88 Execution status of the command. 89 90 <enum 0 reo_successful_execution> Command has successfully 91 be executed 92 <enum 1 reo_blocked_execution> Command could not be executed 93 as the queue or cache was blocked 94 <enum 2 reo_failed_execution> Command has encountered problems 95 when executing, like the queue descriptor not being valid. 96 None of the status fields in the entire STATUS TLV are valid. 97 98 <enum 3 reo_resource_blocked> Command is NOT executed because 99 one or more descriptors were blocked. This is SW programming 100 mistake. 101 None of the status fields in the entire STATUS TLV are valid. 102 103 104 <legal 0-3> 105 */ 106 107 #define UNIFORM_REO_STATUS_HEADER_REO_CMD_EXECUTION_STATUS_OFFSET 0x00000000 108 #define UNIFORM_REO_STATUS_HEADER_REO_CMD_EXECUTION_STATUS_LSB 26 109 #define UNIFORM_REO_STATUS_HEADER_REO_CMD_EXECUTION_STATUS_MSB 27 110 #define UNIFORM_REO_STATUS_HEADER_REO_CMD_EXECUTION_STATUS_MASK 0x0c000000 111 112 113 /* Description RESERVED_0A 114 115 <legal 0> 116 */ 117 118 #define UNIFORM_REO_STATUS_HEADER_RESERVED_0A_OFFSET 0x00000000 119 #define UNIFORM_REO_STATUS_HEADER_RESERVED_0A_LSB 28 120 #define UNIFORM_REO_STATUS_HEADER_RESERVED_0A_MSB 31 121 #define UNIFORM_REO_STATUS_HEADER_RESERVED_0A_MASK 0xf0000000 122 123 124 /* Description TIMESTAMP 125 126 Timestamp at the moment that this status report is written. 127 128 129 <legal all> 130 */ 131 132 #define UNIFORM_REO_STATUS_HEADER_TIMESTAMP_OFFSET 0x00000004 133 #define UNIFORM_REO_STATUS_HEADER_TIMESTAMP_LSB 0 134 #define UNIFORM_REO_STATUS_HEADER_TIMESTAMP_MSB 31 135 #define UNIFORM_REO_STATUS_HEADER_TIMESTAMP_MASK 0xffffffff 136 137 138 139 #endif // UNIFORM_REO_STATUS_HEADER 140