1  /*
2   * Copyright (c) 2021 The Linux Foundation. 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  // $ATH_LICENSE_HW_HDR_C$
18  //
19  // DO NOT EDIT!  This file is automatically generated
20  //               These definitions are tied to a particular hardware layout
21  
22  
23  #ifndef _UNIFORM_REO_STATUS_HEADER_H_
24  #define _UNIFORM_REO_STATUS_HEADER_H_
25  #if !defined(__ASSEMBLER__)
26  #endif
27  
28  
29  // ################ START SUMMARY #################
30  //
31  //	Dword	Fields
32  //	0	reo_status_number[15:0], cmd_execution_time[25:16], reo_cmd_execution_status[27:26], reserved_0a[31:28]
33  //	1	timestamp[31:0]
34  //
35  // ################ END SUMMARY #################
36  
37  #define NUM_OF_DWORDS_UNIFORM_REO_STATUS_HEADER 2
38  
39  struct uniform_reo_status_header {
40               uint32_t reo_status_number               : 16, //[15:0]
41                        cmd_execution_time              : 10, //[25:16]
42                        reo_cmd_execution_status        :  2, //[27:26]
43                        reserved_0a                     :  4; //[31:28]
44               uint32_t timestamp                       : 32; //[31:0]
45  };
46  
47  /*
48  
49  reo_status_number
50  
51  			Consumer: SW , DEBUG
52  
53  			Producer: REO
54  
55  
56  
57  			The value in this field is equal to value of the
58  			'REO_CMD_Number' field the REO command
59  
60  
61  
62  			This field helps to correlate the statuses with the REO
63  			commands.
64  
65  
66  
67  			<legal all>
68  
69  cmd_execution_time
70  
71  			Consumer: DEBUG
72  
73  			Producer: REO
74  
75  
76  
77  			The amount of time REO took to excecute the command.
78  			Note that this time does not include the duration of the
79  			command waiting in the command ring, before the execution
80  			started.
81  
82  
83  
84  			In us.
85  
86  
87  
88  			<legal all>
89  
90  reo_cmd_execution_status
91  
92  			Consumer: DEBUG
93  
94  			Producer: REO
95  
96  
97  
98  			Execution status of the command.
99  
100  
101  
102  			<enum 0 reo_successful_execution> Command has
103  			successfully be executed
104  
105  			<enum 1 reo_blocked_execution> Command could not be
106  			executed as the queue or cache was blocked
107  
108  			<enum 2 reo_failed_execution> Command has encountered
109  			problems when executing, like the queue descriptor not being
110  			valid. None of the status fields in the entire STATUS TLV
111  			are valid.
112  
113  			<enum 3 reo_resource_blocked> Command is NOT  executed
114  			because one or more descriptors were blocked. This is SW
115  			programming mistake.
116  
117  			None of the status fields in the entire STATUS TLV are
118  			valid.
119  
120  
121  
122  			<legal  0-3>
123  
124  reserved_0a
125  
126  			<legal 0>
127  
128  timestamp
129  
130  			Timestamp at the moment that this status report is
131  			written.
132  
133  
134  
135  			<legal all>
136  */
137  
138  
139  /* Description		UNIFORM_REO_STATUS_HEADER_0_REO_STATUS_NUMBER
140  
141  			Consumer: SW , DEBUG
142  
143  			Producer: REO
144  
145  
146  
147  			The value in this field is equal to value of the
148  			'REO_CMD_Number' field the REO command
149  
150  
151  
152  			This field helps to correlate the statuses with the REO
153  			commands.
154  
155  
156  
157  			<legal all>
158  */
159  #define UNIFORM_REO_STATUS_HEADER_0_REO_STATUS_NUMBER_OFFSET         0x00000000
160  #define UNIFORM_REO_STATUS_HEADER_0_REO_STATUS_NUMBER_LSB            0
161  #define UNIFORM_REO_STATUS_HEADER_0_REO_STATUS_NUMBER_MASK           0x0000ffff
162  
163  /* Description		UNIFORM_REO_STATUS_HEADER_0_CMD_EXECUTION_TIME
164  
165  			Consumer: DEBUG
166  
167  			Producer: REO
168  
169  
170  
171  			The amount of time REO took to excecute the command.
172  			Note that this time does not include the duration of the
173  			command waiting in the command ring, before the execution
174  			started.
175  
176  
177  
178  			In us.
179  
180  
181  
182  			<legal all>
183  */
184  #define UNIFORM_REO_STATUS_HEADER_0_CMD_EXECUTION_TIME_OFFSET        0x00000000
185  #define UNIFORM_REO_STATUS_HEADER_0_CMD_EXECUTION_TIME_LSB           16
186  #define UNIFORM_REO_STATUS_HEADER_0_CMD_EXECUTION_TIME_MASK          0x03ff0000
187  
188  /* Description		UNIFORM_REO_STATUS_HEADER_0_REO_CMD_EXECUTION_STATUS
189  
190  			Consumer: DEBUG
191  
192  			Producer: REO
193  
194  
195  
196  			Execution status of the command.
197  
198  
199  
200  			<enum 0 reo_successful_execution> Command has
201  			successfully be executed
202  
203  			<enum 1 reo_blocked_execution> Command could not be
204  			executed as the queue or cache was blocked
205  
206  			<enum 2 reo_failed_execution> Command has encountered
207  			problems when executing, like the queue descriptor not being
208  			valid. None of the status fields in the entire STATUS TLV
209  			are valid.
210  
211  			<enum 3 reo_resource_blocked> Command is NOT  executed
212  			because one or more descriptors were blocked. This is SW
213  			programming mistake.
214  
215  			None of the status fields in the entire STATUS TLV are
216  			valid.
217  
218  
219  
220  			<legal  0-3>
221  */
222  #define UNIFORM_REO_STATUS_HEADER_0_REO_CMD_EXECUTION_STATUS_OFFSET  0x00000000
223  #define UNIFORM_REO_STATUS_HEADER_0_REO_CMD_EXECUTION_STATUS_LSB     26
224  #define UNIFORM_REO_STATUS_HEADER_0_REO_CMD_EXECUTION_STATUS_MASK    0x0c000000
225  
226  /* Description		UNIFORM_REO_STATUS_HEADER_0_RESERVED_0A
227  
228  			<legal 0>
229  */
230  #define UNIFORM_REO_STATUS_HEADER_0_RESERVED_0A_OFFSET               0x00000000
231  #define UNIFORM_REO_STATUS_HEADER_0_RESERVED_0A_LSB                  28
232  #define UNIFORM_REO_STATUS_HEADER_0_RESERVED_0A_MASK                 0xf0000000
233  
234  /* Description		UNIFORM_REO_STATUS_HEADER_1_TIMESTAMP
235  
236  			Timestamp at the moment that this status report is
237  			written.
238  
239  
240  
241  			<legal all>
242  */
243  #define UNIFORM_REO_STATUS_HEADER_1_TIMESTAMP_OFFSET                 0x00000004
244  #define UNIFORM_REO_STATUS_HEADER_1_TIMESTAMP_LSB                    0
245  #define UNIFORM_REO_STATUS_HEADER_1_TIMESTAMP_MASK                   0xffffffff
246  
247  
248  #endif // _UNIFORM_REO_STATUS_HEADER_H_
249