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