xref: /wlan-driver/fw-api/hw/qca6290/11ax/v2/uniform_descriptor_header.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for
5  * any purpose with or without fee is hereby granted, provided that the
6  * above copyright notice and this permission notice appear in all
7  * copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16  * PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 #ifndef _UNIFORM_DESCRIPTOR_HEADER_H_
20 #define _UNIFORM_DESCRIPTOR_HEADER_H_
21 #if !defined(__ASSEMBLER__)
22 #endif
23 
24 
25 // ################ START SUMMARY #################
26 //
27 //	Dword	Fields
28 //	0	owner[3:0], buffer_type[7:4], reserved_0a[31:8]
29 //
30 // ################ END SUMMARY #################
31 
32 #define NUM_OF_DWORDS_UNIFORM_DESCRIPTOR_HEADER 1
33 
34 struct uniform_descriptor_header {
35              uint32_t owner                           :  4, //[3:0]
36                       buffer_type                     :  4, //[7:4]
37                       reserved_0a                     : 24; //[31:8]
38 };
39 
40 /*
41 
42 owner
43 
44 			Consumer: In DEBUG mode: WBM, TQM, TXDMA, RXDMA, REO
45 
46 			Producer: In DEBUG mode: WBM, TQM, TXDMA, RXDMA, REO
47 
48 
49 
50 			The owner of this data structure:
51 
52 			<enum 0 WBM_owned> Buffer Manager currently owns this
53 			data structure.
54 
55 			<enum 1 SW_OR_FW_owned> Software of FW currently owns
56 			this data structure.
57 
58 			<enum 2 TQM_owned> Transmit Queue Manager currently owns
59 			this data structure.
60 
61 			<enum 3 RXDMA_owned> Receive DMA currently owns this
62 			data structure.
63 
64 			<enum 4 REO_owned> Reorder currently owns this data
65 			structure.
66 
67 			<enum 5 SWITCH_owned> SWITCH currently owns this data
68 			structure.
69 
70 
71 
72 			<legal 0-5>
73 
74 buffer_type
75 
76 			Consumer: In DEBUG mode: WBM, TQM, TXDMA, RXDMA, REO
77 
78 			Producer: In DEBUG mode: WBM, TQM, TXDMA, RXDMA, REO
79 
80 
81 
82 			Field describing what contents format is of this
83 			descriptor
84 
85 
86 
87 			<enum 0 Transmit_MSDU_Link_descriptor >
88 
89 			<enum 1 Transmit_MPDU_Link_descriptor >
90 
91 			<enum 2 Transmit_MPDU_Queue_head_descriptor>
92 
93 			<enum 3 Transmit_MPDU_Queue_ext_descriptor>
94 
95 			<enum 4 Transmit_flow_descriptor>
96 
97 			<enum 5 Transmit_buffer > NOT TO BE USED:
98 
99 
100 
101 			<enum 6 Receive_MSDU_Link_descriptor >
102 
103 			<enum 7 Receive_MPDU_Link_descriptor >
104 
105 			<enum 8 Receive_REO_queue_descriptor >
106 
107 			<enum 9 Receive_REO_queue_ext_descriptor >
108 
109 
110 
111 			<enum 10 Receive_buffer >
112 
113 
114 
115 			<enum 11 Idle_link_list_entry>
116 
117 
118 
119 			<legal 0-11>
120 
121 reserved_0a
122 
123 			<legal 0>
124 */
125 
126 
127 /* Description		UNIFORM_DESCRIPTOR_HEADER_0_OWNER
128 
129 			Consumer: In DEBUG mode: WBM, TQM, TXDMA, RXDMA, REO
130 
131 			Producer: In DEBUG mode: WBM, TQM, TXDMA, RXDMA, REO
132 
133 
134 
135 			The owner of this data structure:
136 
137 			<enum 0 WBM_owned> Buffer Manager currently owns this
138 			data structure.
139 
140 			<enum 1 SW_OR_FW_owned> Software of FW currently owns
141 			this data structure.
142 
143 			<enum 2 TQM_owned> Transmit Queue Manager currently owns
144 			this data structure.
145 
146 			<enum 3 RXDMA_owned> Receive DMA currently owns this
147 			data structure.
148 
149 			<enum 4 REO_owned> Reorder currently owns this data
150 			structure.
151 
152 			<enum 5 SWITCH_owned> SWITCH currently owns this data
153 			structure.
154 
155 
156 
157 			<legal 0-5>
158 */
159 #define UNIFORM_DESCRIPTOR_HEADER_0_OWNER_OFFSET                     0x00000000
160 #define UNIFORM_DESCRIPTOR_HEADER_0_OWNER_LSB                        0
161 #define UNIFORM_DESCRIPTOR_HEADER_0_OWNER_MASK                       0x0000000f
162 
163 /* Description		UNIFORM_DESCRIPTOR_HEADER_0_BUFFER_TYPE
164 
165 			Consumer: In DEBUG mode: WBM, TQM, TXDMA, RXDMA, REO
166 
167 			Producer: In DEBUG mode: WBM, TQM, TXDMA, RXDMA, REO
168 
169 
170 
171 			Field describing what contents format is of this
172 			descriptor
173 
174 
175 
176 			<enum 0 Transmit_MSDU_Link_descriptor >
177 
178 			<enum 1 Transmit_MPDU_Link_descriptor >
179 
180 			<enum 2 Transmit_MPDU_Queue_head_descriptor>
181 
182 			<enum 3 Transmit_MPDU_Queue_ext_descriptor>
183 
184 			<enum 4 Transmit_flow_descriptor>
185 
186 			<enum 5 Transmit_buffer > NOT TO BE USED:
187 
188 
189 
190 			<enum 6 Receive_MSDU_Link_descriptor >
191 
192 			<enum 7 Receive_MPDU_Link_descriptor >
193 
194 			<enum 8 Receive_REO_queue_descriptor >
195 
196 			<enum 9 Receive_REO_queue_ext_descriptor >
197 
198 
199 
200 			<enum 10 Receive_buffer >
201 
202 
203 
204 			<enum 11 Idle_link_list_entry>
205 
206 
207 
208 			<legal 0-11>
209 */
210 #define UNIFORM_DESCRIPTOR_HEADER_0_BUFFER_TYPE_OFFSET               0x00000000
211 #define UNIFORM_DESCRIPTOR_HEADER_0_BUFFER_TYPE_LSB                  4
212 #define UNIFORM_DESCRIPTOR_HEADER_0_BUFFER_TYPE_MASK                 0x000000f0
213 
214 /* Description		UNIFORM_DESCRIPTOR_HEADER_0_RESERVED_0A
215 
216 			<legal 0>
217 */
218 #define UNIFORM_DESCRIPTOR_HEADER_0_RESERVED_0A_OFFSET               0x00000000
219 #define UNIFORM_DESCRIPTOR_HEADER_0_RESERVED_0A_LSB                  8
220 #define UNIFORM_DESCRIPTOR_HEADER_0_RESERVED_0A_MASK                 0xffffff00
221 
222 
223 #endif // _UNIFORM_DESCRIPTOR_HEADER_H_
224