xref: /wlan-driver/fw-api/hw/qcn9000/uniform_descriptor_header.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2019, The Linux Foundation. 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_DESCRIPTOR_HEADER_H_
18*5113495bSYour Name #define _UNIFORM_DESCRIPTOR_HEADER_H_
19*5113495bSYour Name #if !defined(__ASSEMBLER__)
20*5113495bSYour Name #endif
21*5113495bSYour Name 
22*5113495bSYour Name 
23*5113495bSYour Name // ################ START SUMMARY #################
24*5113495bSYour Name //
25*5113495bSYour Name //	Dword	Fields
26*5113495bSYour Name //	0	owner[3:0], buffer_type[7:4], reserved_0a[31:8]
27*5113495bSYour Name //
28*5113495bSYour Name // ################ END SUMMARY #################
29*5113495bSYour Name 
30*5113495bSYour Name #define NUM_OF_DWORDS_UNIFORM_DESCRIPTOR_HEADER 1
31*5113495bSYour Name 
32*5113495bSYour Name struct uniform_descriptor_header {
33*5113495bSYour Name              uint32_t owner                           :  4, //[3:0]
34*5113495bSYour Name                       buffer_type                     :  4, //[7:4]
35*5113495bSYour Name                       reserved_0a                     : 24; //[31:8]
36*5113495bSYour Name };
37*5113495bSYour Name 
38*5113495bSYour Name /*
39*5113495bSYour Name 
40*5113495bSYour Name owner
41*5113495bSYour Name 
42*5113495bSYour Name 			Consumer: In DEBUG mode: WBM, TQM, TXDMA, RXDMA, REO
43*5113495bSYour Name 
44*5113495bSYour Name 			Producer: In DEBUG mode: WBM, TQM, TXDMA, RXDMA, REO
45*5113495bSYour Name 
46*5113495bSYour Name 
47*5113495bSYour Name 
48*5113495bSYour Name 			The owner of this data structure:
49*5113495bSYour Name 
50*5113495bSYour Name 			<enum 0 WBM_owned> Buffer Manager currently owns this
51*5113495bSYour Name 			data structure.
52*5113495bSYour Name 
53*5113495bSYour Name 			<enum 1 SW_OR_FW_owned> Software of FW currently owns
54*5113495bSYour Name 			this data structure.
55*5113495bSYour Name 
56*5113495bSYour Name 			<enum 2 TQM_owned> Transmit Queue Manager currently owns
57*5113495bSYour Name 			this data structure.
58*5113495bSYour Name 
59*5113495bSYour Name 			<enum 3 RXDMA_owned> Receive DMA currently owns this
60*5113495bSYour Name 			data structure.
61*5113495bSYour Name 
62*5113495bSYour Name 			<enum 4 REO_owned> Reorder currently owns this data
63*5113495bSYour Name 			structure.
64*5113495bSYour Name 
65*5113495bSYour Name 			<enum 5 SWITCH_owned> SWITCH currently owns this data
66*5113495bSYour Name 			structure.
67*5113495bSYour Name 
68*5113495bSYour Name 
69*5113495bSYour Name 
70*5113495bSYour Name 			<legal 0-5>
71*5113495bSYour Name 
72*5113495bSYour Name buffer_type
73*5113495bSYour Name 
74*5113495bSYour Name 			Consumer: In DEBUG mode: WBM, TQM, TXDMA, RXDMA, REO
75*5113495bSYour Name 
76*5113495bSYour Name 			Producer: In DEBUG mode: WBM, TQM, TXDMA, RXDMA, REO
77*5113495bSYour Name 
78*5113495bSYour Name 
79*5113495bSYour Name 
80*5113495bSYour Name 			Field describing what contents format is of this
81*5113495bSYour Name 			descriptor
82*5113495bSYour Name 
83*5113495bSYour Name 
84*5113495bSYour Name 
85*5113495bSYour Name 			<enum 0 Transmit_MSDU_Link_descriptor >
86*5113495bSYour Name 
87*5113495bSYour Name 			<enum 1 Transmit_MPDU_Link_descriptor >
88*5113495bSYour Name 
89*5113495bSYour Name 			<enum 2 Transmit_MPDU_Queue_head_descriptor>
90*5113495bSYour Name 
91*5113495bSYour Name 			<enum 3 Transmit_MPDU_Queue_ext_descriptor>
92*5113495bSYour Name 
93*5113495bSYour Name 			<enum 4 Transmit_flow_descriptor>
94*5113495bSYour Name 
95*5113495bSYour Name 			<enum 5 Transmit_buffer > NOT TO BE USED:
96*5113495bSYour Name 
97*5113495bSYour Name 
98*5113495bSYour Name 
99*5113495bSYour Name 			<enum 6 Receive_MSDU_Link_descriptor >
100*5113495bSYour Name 
101*5113495bSYour Name 			<enum 7 Receive_MPDU_Link_descriptor >
102*5113495bSYour Name 
103*5113495bSYour Name 			<enum 8 Receive_REO_queue_descriptor >
104*5113495bSYour Name 
105*5113495bSYour Name 			<enum 9 Receive_REO_queue_ext_descriptor >
106*5113495bSYour Name 
107*5113495bSYour Name 
108*5113495bSYour Name 
109*5113495bSYour Name 			<enum 10 Receive_buffer >
110*5113495bSYour Name 
111*5113495bSYour Name 
112*5113495bSYour Name 
113*5113495bSYour Name 			<enum 11 Idle_link_list_entry>
114*5113495bSYour Name 
115*5113495bSYour Name 
116*5113495bSYour Name 
117*5113495bSYour Name 			<legal 0-11>
118*5113495bSYour Name 
119*5113495bSYour Name reserved_0a
120*5113495bSYour Name 
121*5113495bSYour Name 			<legal 0>
122*5113495bSYour Name */
123*5113495bSYour Name 
124*5113495bSYour Name 
125*5113495bSYour Name /* Description		UNIFORM_DESCRIPTOR_HEADER_0_OWNER
126*5113495bSYour Name 
127*5113495bSYour Name 			Consumer: In DEBUG mode: WBM, TQM, TXDMA, RXDMA, REO
128*5113495bSYour Name 
129*5113495bSYour Name 			Producer: In DEBUG mode: WBM, TQM, TXDMA, RXDMA, REO
130*5113495bSYour Name 
131*5113495bSYour Name 
132*5113495bSYour Name 
133*5113495bSYour Name 			The owner of this data structure:
134*5113495bSYour Name 
135*5113495bSYour Name 			<enum 0 WBM_owned> Buffer Manager currently owns this
136*5113495bSYour Name 			data structure.
137*5113495bSYour Name 
138*5113495bSYour Name 			<enum 1 SW_OR_FW_owned> Software of FW currently owns
139*5113495bSYour Name 			this data structure.
140*5113495bSYour Name 
141*5113495bSYour Name 			<enum 2 TQM_owned> Transmit Queue Manager currently owns
142*5113495bSYour Name 			this data structure.
143*5113495bSYour Name 
144*5113495bSYour Name 			<enum 3 RXDMA_owned> Receive DMA currently owns this
145*5113495bSYour Name 			data structure.
146*5113495bSYour Name 
147*5113495bSYour Name 			<enum 4 REO_owned> Reorder currently owns this data
148*5113495bSYour Name 			structure.
149*5113495bSYour Name 
150*5113495bSYour Name 			<enum 5 SWITCH_owned> SWITCH currently owns this data
151*5113495bSYour Name 			structure.
152*5113495bSYour Name 
153*5113495bSYour Name 
154*5113495bSYour Name 
155*5113495bSYour Name 			<legal 0-5>
156*5113495bSYour Name */
157*5113495bSYour Name #define UNIFORM_DESCRIPTOR_HEADER_0_OWNER_OFFSET                     0x00000000
158*5113495bSYour Name #define UNIFORM_DESCRIPTOR_HEADER_0_OWNER_LSB                        0
159*5113495bSYour Name #define UNIFORM_DESCRIPTOR_HEADER_0_OWNER_MASK                       0x0000000f
160*5113495bSYour Name 
161*5113495bSYour Name /* Description		UNIFORM_DESCRIPTOR_HEADER_0_BUFFER_TYPE
162*5113495bSYour Name 
163*5113495bSYour Name 			Consumer: In DEBUG mode: WBM, TQM, TXDMA, RXDMA, REO
164*5113495bSYour Name 
165*5113495bSYour Name 			Producer: In DEBUG mode: WBM, TQM, TXDMA, RXDMA, REO
166*5113495bSYour Name 
167*5113495bSYour Name 
168*5113495bSYour Name 
169*5113495bSYour Name 			Field describing what contents format is of this
170*5113495bSYour Name 			descriptor
171*5113495bSYour Name 
172*5113495bSYour Name 
173*5113495bSYour Name 
174*5113495bSYour Name 			<enum 0 Transmit_MSDU_Link_descriptor >
175*5113495bSYour Name 
176*5113495bSYour Name 			<enum 1 Transmit_MPDU_Link_descriptor >
177*5113495bSYour Name 
178*5113495bSYour Name 			<enum 2 Transmit_MPDU_Queue_head_descriptor>
179*5113495bSYour Name 
180*5113495bSYour Name 			<enum 3 Transmit_MPDU_Queue_ext_descriptor>
181*5113495bSYour Name 
182*5113495bSYour Name 			<enum 4 Transmit_flow_descriptor>
183*5113495bSYour Name 
184*5113495bSYour Name 			<enum 5 Transmit_buffer > NOT TO BE USED:
185*5113495bSYour Name 
186*5113495bSYour Name 
187*5113495bSYour Name 
188*5113495bSYour Name 			<enum 6 Receive_MSDU_Link_descriptor >
189*5113495bSYour Name 
190*5113495bSYour Name 			<enum 7 Receive_MPDU_Link_descriptor >
191*5113495bSYour Name 
192*5113495bSYour Name 			<enum 8 Receive_REO_queue_descriptor >
193*5113495bSYour Name 
194*5113495bSYour Name 			<enum 9 Receive_REO_queue_ext_descriptor >
195*5113495bSYour Name 
196*5113495bSYour Name 
197*5113495bSYour Name 
198*5113495bSYour Name 			<enum 10 Receive_buffer >
199*5113495bSYour Name 
200*5113495bSYour Name 
201*5113495bSYour Name 
202*5113495bSYour Name 			<enum 11 Idle_link_list_entry>
203*5113495bSYour Name 
204*5113495bSYour Name 
205*5113495bSYour Name 
206*5113495bSYour Name 			<legal 0-11>
207*5113495bSYour Name */
208*5113495bSYour Name #define UNIFORM_DESCRIPTOR_HEADER_0_BUFFER_TYPE_OFFSET               0x00000000
209*5113495bSYour Name #define UNIFORM_DESCRIPTOR_HEADER_0_BUFFER_TYPE_LSB                  4
210*5113495bSYour Name #define UNIFORM_DESCRIPTOR_HEADER_0_BUFFER_TYPE_MASK                 0x000000f0
211*5113495bSYour Name 
212*5113495bSYour Name /* Description		UNIFORM_DESCRIPTOR_HEADER_0_RESERVED_0A
213*5113495bSYour Name 
214*5113495bSYour Name 			<legal 0>
215*5113495bSYour Name */
216*5113495bSYour Name #define UNIFORM_DESCRIPTOR_HEADER_0_RESERVED_0A_OFFSET               0x00000000
217*5113495bSYour Name #define UNIFORM_DESCRIPTOR_HEADER_0_RESERVED_0A_LSB                  8
218*5113495bSYour Name #define UNIFORM_DESCRIPTOR_HEADER_0_RESERVED_0A_MASK                 0xffffff00
219*5113495bSYour Name 
220*5113495bSYour Name 
221*5113495bSYour Name #endif // _UNIFORM_DESCRIPTOR_HEADER_H_
222