xref: /wlan-driver/fw-api/hw/qcc2072/v1/ce_stat_desc.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2024 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 #ifndef _CE_STAT_DESC_H_
19*5113495bSYour Name #define _CE_STAT_DESC_H_
20*5113495bSYour Name 
21*5113495bSYour Name #define NUM_OF_DWORDS_CE_STAT_DESC 4
22*5113495bSYour Name 
23*5113495bSYour Name struct ce_stat_desc {
24*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
25*5113495bSYour Name              uint32_t ce_res_5                                                :  8,
26*5113495bSYour Name                       toeplitz_en                                             :  1,
27*5113495bSYour Name                       src_swap                                                :  1,
28*5113495bSYour Name                       dest_swap                                               :  1,
29*5113495bSYour Name                       gather                                                  :  1,
30*5113495bSYour Name                       barrier_read                                            :  1,
31*5113495bSYour Name                       ce_res_6                                                :  3,
32*5113495bSYour Name                       length                                                  : 16;
33*5113495bSYour Name              uint32_t toeplitz_hash_0                                         : 32;
34*5113495bSYour Name              uint32_t toeplitz_hash_1                                         : 32;
35*5113495bSYour Name              uint32_t fw_metadata                                             : 16,
36*5113495bSYour Name                       ce_res_7                                                :  4,
37*5113495bSYour Name                       ring_id                                                 :  8,
38*5113495bSYour Name                       looping_count                                           :  4;
39*5113495bSYour Name #else
40*5113495bSYour Name              uint32_t length                                                  : 16,
41*5113495bSYour Name                       ce_res_6                                                :  3,
42*5113495bSYour Name                       barrier_read                                            :  1,
43*5113495bSYour Name                       gather                                                  :  1,
44*5113495bSYour Name                       dest_swap                                               :  1,
45*5113495bSYour Name                       src_swap                                                :  1,
46*5113495bSYour Name                       toeplitz_en                                             :  1,
47*5113495bSYour Name                       ce_res_5                                                :  8;
48*5113495bSYour Name              uint32_t toeplitz_hash_0                                         : 32;
49*5113495bSYour Name              uint32_t toeplitz_hash_1                                         : 32;
50*5113495bSYour Name              uint32_t looping_count                                           :  4,
51*5113495bSYour Name                       ring_id                                                 :  8,
52*5113495bSYour Name                       ce_res_7                                                :  4,
53*5113495bSYour Name                       fw_metadata                                             : 16;
54*5113495bSYour Name #endif
55*5113495bSYour Name };
56*5113495bSYour Name 
57*5113495bSYour Name #define CE_STAT_DESC_CE_RES_5_OFFSET                                                0x00000000
58*5113495bSYour Name #define CE_STAT_DESC_CE_RES_5_LSB                                                   0
59*5113495bSYour Name #define CE_STAT_DESC_CE_RES_5_MSB                                                   7
60*5113495bSYour Name #define CE_STAT_DESC_CE_RES_5_MASK                                                  0x000000ff
61*5113495bSYour Name 
62*5113495bSYour Name #define CE_STAT_DESC_TOEPLITZ_EN_OFFSET                                             0x00000000
63*5113495bSYour Name #define CE_STAT_DESC_TOEPLITZ_EN_LSB                                                8
64*5113495bSYour Name #define CE_STAT_DESC_TOEPLITZ_EN_MSB                                                8
65*5113495bSYour Name #define CE_STAT_DESC_TOEPLITZ_EN_MASK                                               0x00000100
66*5113495bSYour Name 
67*5113495bSYour Name #define CE_STAT_DESC_SRC_SWAP_OFFSET                                                0x00000000
68*5113495bSYour Name #define CE_STAT_DESC_SRC_SWAP_LSB                                                   9
69*5113495bSYour Name #define CE_STAT_DESC_SRC_SWAP_MSB                                                   9
70*5113495bSYour Name #define CE_STAT_DESC_SRC_SWAP_MASK                                                  0x00000200
71*5113495bSYour Name 
72*5113495bSYour Name #define CE_STAT_DESC_DEST_SWAP_OFFSET                                               0x00000000
73*5113495bSYour Name #define CE_STAT_DESC_DEST_SWAP_LSB                                                  10
74*5113495bSYour Name #define CE_STAT_DESC_DEST_SWAP_MSB                                                  10
75*5113495bSYour Name #define CE_STAT_DESC_DEST_SWAP_MASK                                                 0x00000400
76*5113495bSYour Name 
77*5113495bSYour Name #define CE_STAT_DESC_GATHER_OFFSET                                                  0x00000000
78*5113495bSYour Name #define CE_STAT_DESC_GATHER_LSB                                                     11
79*5113495bSYour Name #define CE_STAT_DESC_GATHER_MSB                                                     11
80*5113495bSYour Name #define CE_STAT_DESC_GATHER_MASK                                                    0x00000800
81*5113495bSYour Name 
82*5113495bSYour Name #define CE_STAT_DESC_BARRIER_READ_OFFSET                                            0x00000000
83*5113495bSYour Name #define CE_STAT_DESC_BARRIER_READ_LSB                                               12
84*5113495bSYour Name #define CE_STAT_DESC_BARRIER_READ_MSB                                               12
85*5113495bSYour Name #define CE_STAT_DESC_BARRIER_READ_MASK                                              0x00001000
86*5113495bSYour Name 
87*5113495bSYour Name #define CE_STAT_DESC_CE_RES_6_OFFSET                                                0x00000000
88*5113495bSYour Name #define CE_STAT_DESC_CE_RES_6_LSB                                                   13
89*5113495bSYour Name #define CE_STAT_DESC_CE_RES_6_MSB                                                   15
90*5113495bSYour Name #define CE_STAT_DESC_CE_RES_6_MASK                                                  0x0000e000
91*5113495bSYour Name 
92*5113495bSYour Name #define CE_STAT_DESC_LENGTH_OFFSET                                                  0x00000000
93*5113495bSYour Name #define CE_STAT_DESC_LENGTH_LSB                                                     16
94*5113495bSYour Name #define CE_STAT_DESC_LENGTH_MSB                                                     31
95*5113495bSYour Name #define CE_STAT_DESC_LENGTH_MASK                                                    0xffff0000
96*5113495bSYour Name 
97*5113495bSYour Name #define CE_STAT_DESC_TOEPLITZ_HASH_0_OFFSET                                         0x00000004
98*5113495bSYour Name #define CE_STAT_DESC_TOEPLITZ_HASH_0_LSB                                            0
99*5113495bSYour Name #define CE_STAT_DESC_TOEPLITZ_HASH_0_MSB                                            31
100*5113495bSYour Name #define CE_STAT_DESC_TOEPLITZ_HASH_0_MASK                                           0xffffffff
101*5113495bSYour Name 
102*5113495bSYour Name #define CE_STAT_DESC_TOEPLITZ_HASH_1_OFFSET                                         0x00000008
103*5113495bSYour Name #define CE_STAT_DESC_TOEPLITZ_HASH_1_LSB                                            0
104*5113495bSYour Name #define CE_STAT_DESC_TOEPLITZ_HASH_1_MSB                                            31
105*5113495bSYour Name #define CE_STAT_DESC_TOEPLITZ_HASH_1_MASK                                           0xffffffff
106*5113495bSYour Name 
107*5113495bSYour Name #define CE_STAT_DESC_FW_METADATA_OFFSET                                             0x0000000c
108*5113495bSYour Name #define CE_STAT_DESC_FW_METADATA_LSB                                                0
109*5113495bSYour Name #define CE_STAT_DESC_FW_METADATA_MSB                                                15
110*5113495bSYour Name #define CE_STAT_DESC_FW_METADATA_MASK                                               0x0000ffff
111*5113495bSYour Name 
112*5113495bSYour Name #define CE_STAT_DESC_CE_RES_7_OFFSET                                                0x0000000c
113*5113495bSYour Name #define CE_STAT_DESC_CE_RES_7_LSB                                                   16
114*5113495bSYour Name #define CE_STAT_DESC_CE_RES_7_MSB                                                   19
115*5113495bSYour Name #define CE_STAT_DESC_CE_RES_7_MASK                                                  0x000f0000
116*5113495bSYour Name 
117*5113495bSYour Name #define CE_STAT_DESC_RING_ID_OFFSET                                                 0x0000000c
118*5113495bSYour Name #define CE_STAT_DESC_RING_ID_LSB                                                    20
119*5113495bSYour Name #define CE_STAT_DESC_RING_ID_MSB                                                    27
120*5113495bSYour Name #define CE_STAT_DESC_RING_ID_MASK                                                   0x0ff00000
121*5113495bSYour Name 
122*5113495bSYour Name #define CE_STAT_DESC_LOOPING_COUNT_OFFSET                                           0x0000000c
123*5113495bSYour Name #define CE_STAT_DESC_LOOPING_COUNT_LSB                                              28
124*5113495bSYour Name #define CE_STAT_DESC_LOOPING_COUNT_MSB                                              31
125*5113495bSYour Name #define CE_STAT_DESC_LOOPING_COUNT_MASK                                             0xf0000000
126*5113495bSYour Name 
127*5113495bSYour Name #endif
128