xref: /wlan-driver/fw-api/hw/qcn9224/v1/ce_stat_desc.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name 
2*5113495bSYour Name /* Copyright (c) 2021, 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 
18*5113495bSYour Name 
19*5113495bSYour Name 
20*5113495bSYour Name 
21*5113495bSYour Name 
22*5113495bSYour Name 
23*5113495bSYour Name 
24*5113495bSYour Name 
25*5113495bSYour Name 
26*5113495bSYour Name #ifndef _CE_STAT_DESC_H_
27*5113495bSYour Name #define _CE_STAT_DESC_H_
28*5113495bSYour Name #if !defined(__ASSEMBLER__)
29*5113495bSYour Name #endif
30*5113495bSYour Name 
31*5113495bSYour Name #define NUM_OF_DWORDS_CE_STAT_DESC 4
32*5113495bSYour Name 
33*5113495bSYour Name 
34*5113495bSYour Name struct ce_stat_desc {
35*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
36*5113495bSYour Name              uint32_t ce_res_5                                                :  8,
37*5113495bSYour Name                       toeplitz_en                                             :  1,
38*5113495bSYour Name                       src_swap                                                :  1,
39*5113495bSYour Name                       dest_swap                                               :  1,
40*5113495bSYour Name                       gather                                                  :  1,
41*5113495bSYour Name                       barrier_read                                            :  1,
42*5113495bSYour Name                       ce_res_6                                                :  3,
43*5113495bSYour Name                       length                                                  : 16;
44*5113495bSYour Name              uint32_t toeplitz_hash_0                                         : 32;
45*5113495bSYour Name              uint32_t toeplitz_hash_1                                         : 32;
46*5113495bSYour Name              uint32_t fw_metadata                                             : 16,
47*5113495bSYour Name                       ce_res_7                                                :  4,
48*5113495bSYour Name                       ring_id                                                 :  8,
49*5113495bSYour Name                       looping_count                                           :  4;
50*5113495bSYour Name #else
51*5113495bSYour Name              uint32_t length                                                  : 16,
52*5113495bSYour Name                       ce_res_6                                                :  3,
53*5113495bSYour Name                       barrier_read                                            :  1,
54*5113495bSYour Name                       gather                                                  :  1,
55*5113495bSYour Name                       dest_swap                                               :  1,
56*5113495bSYour Name                       src_swap                                                :  1,
57*5113495bSYour Name                       toeplitz_en                                             :  1,
58*5113495bSYour Name                       ce_res_5                                                :  8;
59*5113495bSYour Name              uint32_t toeplitz_hash_0                                         : 32;
60*5113495bSYour Name              uint32_t toeplitz_hash_1                                         : 32;
61*5113495bSYour Name              uint32_t looping_count                                           :  4,
62*5113495bSYour Name                       ring_id                                                 :  8,
63*5113495bSYour Name                       ce_res_7                                                :  4,
64*5113495bSYour Name                       fw_metadata                                             : 16;
65*5113495bSYour Name #endif
66*5113495bSYour Name };
67*5113495bSYour Name 
68*5113495bSYour Name 
69*5113495bSYour Name 
70*5113495bSYour Name 
71*5113495bSYour Name #define CE_STAT_DESC_CE_RES_5_OFFSET                                                0x00000000
72*5113495bSYour Name #define CE_STAT_DESC_CE_RES_5_LSB                                                   0
73*5113495bSYour Name #define CE_STAT_DESC_CE_RES_5_MSB                                                   7
74*5113495bSYour Name #define CE_STAT_DESC_CE_RES_5_MASK                                                  0x000000ff
75*5113495bSYour Name 
76*5113495bSYour Name 
77*5113495bSYour Name 
78*5113495bSYour Name 
79*5113495bSYour Name #define CE_STAT_DESC_TOEPLITZ_EN_OFFSET                                             0x00000000
80*5113495bSYour Name #define CE_STAT_DESC_TOEPLITZ_EN_LSB                                                8
81*5113495bSYour Name #define CE_STAT_DESC_TOEPLITZ_EN_MSB                                                8
82*5113495bSYour Name #define CE_STAT_DESC_TOEPLITZ_EN_MASK                                               0x00000100
83*5113495bSYour Name 
84*5113495bSYour Name 
85*5113495bSYour Name 
86*5113495bSYour Name 
87*5113495bSYour Name #define CE_STAT_DESC_SRC_SWAP_OFFSET                                                0x00000000
88*5113495bSYour Name #define CE_STAT_DESC_SRC_SWAP_LSB                                                   9
89*5113495bSYour Name #define CE_STAT_DESC_SRC_SWAP_MSB                                                   9
90*5113495bSYour Name #define CE_STAT_DESC_SRC_SWAP_MASK                                                  0x00000200
91*5113495bSYour Name 
92*5113495bSYour Name 
93*5113495bSYour Name 
94*5113495bSYour Name 
95*5113495bSYour Name #define CE_STAT_DESC_DEST_SWAP_OFFSET                                               0x00000000
96*5113495bSYour Name #define CE_STAT_DESC_DEST_SWAP_LSB                                                  10
97*5113495bSYour Name #define CE_STAT_DESC_DEST_SWAP_MSB                                                  10
98*5113495bSYour Name #define CE_STAT_DESC_DEST_SWAP_MASK                                                 0x00000400
99*5113495bSYour Name 
100*5113495bSYour Name 
101*5113495bSYour Name 
102*5113495bSYour Name 
103*5113495bSYour Name #define CE_STAT_DESC_GATHER_OFFSET                                                  0x00000000
104*5113495bSYour Name #define CE_STAT_DESC_GATHER_LSB                                                     11
105*5113495bSYour Name #define CE_STAT_DESC_GATHER_MSB                                                     11
106*5113495bSYour Name #define CE_STAT_DESC_GATHER_MASK                                                    0x00000800
107*5113495bSYour Name 
108*5113495bSYour Name 
109*5113495bSYour Name 
110*5113495bSYour Name 
111*5113495bSYour Name #define CE_STAT_DESC_BARRIER_READ_OFFSET                                            0x00000000
112*5113495bSYour Name #define CE_STAT_DESC_BARRIER_READ_LSB                                               12
113*5113495bSYour Name #define CE_STAT_DESC_BARRIER_READ_MSB                                               12
114*5113495bSYour Name #define CE_STAT_DESC_BARRIER_READ_MASK                                              0x00001000
115*5113495bSYour Name 
116*5113495bSYour Name 
117*5113495bSYour Name 
118*5113495bSYour Name 
119*5113495bSYour Name #define CE_STAT_DESC_CE_RES_6_OFFSET                                                0x00000000
120*5113495bSYour Name #define CE_STAT_DESC_CE_RES_6_LSB                                                   13
121*5113495bSYour Name #define CE_STAT_DESC_CE_RES_6_MSB                                                   15
122*5113495bSYour Name #define CE_STAT_DESC_CE_RES_6_MASK                                                  0x0000e000
123*5113495bSYour Name 
124*5113495bSYour Name 
125*5113495bSYour Name 
126*5113495bSYour Name 
127*5113495bSYour Name #define CE_STAT_DESC_LENGTH_OFFSET                                                  0x00000000
128*5113495bSYour Name #define CE_STAT_DESC_LENGTH_LSB                                                     16
129*5113495bSYour Name #define CE_STAT_DESC_LENGTH_MSB                                                     31
130*5113495bSYour Name #define CE_STAT_DESC_LENGTH_MASK                                                    0xffff0000
131*5113495bSYour Name 
132*5113495bSYour Name 
133*5113495bSYour Name 
134*5113495bSYour Name 
135*5113495bSYour Name #define CE_STAT_DESC_TOEPLITZ_HASH_0_OFFSET                                         0x00000004
136*5113495bSYour Name #define CE_STAT_DESC_TOEPLITZ_HASH_0_LSB                                            0
137*5113495bSYour Name #define CE_STAT_DESC_TOEPLITZ_HASH_0_MSB                                            31
138*5113495bSYour Name #define CE_STAT_DESC_TOEPLITZ_HASH_0_MASK                                           0xffffffff
139*5113495bSYour Name 
140*5113495bSYour Name 
141*5113495bSYour Name 
142*5113495bSYour Name 
143*5113495bSYour Name #define CE_STAT_DESC_TOEPLITZ_HASH_1_OFFSET                                         0x00000008
144*5113495bSYour Name #define CE_STAT_DESC_TOEPLITZ_HASH_1_LSB                                            0
145*5113495bSYour Name #define CE_STAT_DESC_TOEPLITZ_HASH_1_MSB                                            31
146*5113495bSYour Name #define CE_STAT_DESC_TOEPLITZ_HASH_1_MASK                                           0xffffffff
147*5113495bSYour Name 
148*5113495bSYour Name 
149*5113495bSYour Name 
150*5113495bSYour Name 
151*5113495bSYour Name #define CE_STAT_DESC_FW_METADATA_OFFSET                                             0x0000000c
152*5113495bSYour Name #define CE_STAT_DESC_FW_METADATA_LSB                                                0
153*5113495bSYour Name #define CE_STAT_DESC_FW_METADATA_MSB                                                15
154*5113495bSYour Name #define CE_STAT_DESC_FW_METADATA_MASK                                               0x0000ffff
155*5113495bSYour Name 
156*5113495bSYour Name 
157*5113495bSYour Name 
158*5113495bSYour Name 
159*5113495bSYour Name #define CE_STAT_DESC_CE_RES_7_OFFSET                                                0x0000000c
160*5113495bSYour Name #define CE_STAT_DESC_CE_RES_7_LSB                                                   16
161*5113495bSYour Name #define CE_STAT_DESC_CE_RES_7_MSB                                                   19
162*5113495bSYour Name #define CE_STAT_DESC_CE_RES_7_MASK                                                  0x000f0000
163*5113495bSYour Name 
164*5113495bSYour Name 
165*5113495bSYour Name 
166*5113495bSYour Name 
167*5113495bSYour Name #define CE_STAT_DESC_RING_ID_OFFSET                                                 0x0000000c
168*5113495bSYour Name #define CE_STAT_DESC_RING_ID_LSB                                                    20
169*5113495bSYour Name #define CE_STAT_DESC_RING_ID_MSB                                                    27
170*5113495bSYour Name #define CE_STAT_DESC_RING_ID_MASK                                                   0x0ff00000
171*5113495bSYour Name 
172*5113495bSYour Name 
173*5113495bSYour Name 
174*5113495bSYour Name 
175*5113495bSYour Name #define CE_STAT_DESC_LOOPING_COUNT_OFFSET                                           0x0000000c
176*5113495bSYour Name #define CE_STAT_DESC_LOOPING_COUNT_LSB                                              28
177*5113495bSYour Name #define CE_STAT_DESC_LOOPING_COUNT_MSB                                              31
178*5113495bSYour Name #define CE_STAT_DESC_LOOPING_COUNT_MASK                                             0xf0000000
179*5113495bSYour Name 
180*5113495bSYour Name 
181*5113495bSYour Name 
182*5113495bSYour Name #endif
183