xref: /wlan-driver/fw-api/hw/kiwi/v2/tcl_status_ring.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name 
2*5113495bSYour Name /*
3*5113495bSYour Name  * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
4*5113495bSYour Name  *
5*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for
6*5113495bSYour Name  * any purpose with or without fee is hereby granted, provided that the
7*5113495bSYour Name  * above copyright notice and this permission notice appear in all
8*5113495bSYour Name  * copies.
9*5113495bSYour Name  *
10*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11*5113495bSYour Name  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12*5113495bSYour Name  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13*5113495bSYour Name  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14*5113495bSYour Name  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15*5113495bSYour Name  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16*5113495bSYour Name  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17*5113495bSYour Name  * PERFORMANCE OF THIS SOFTWARE.
18*5113495bSYour Name  */
19*5113495bSYour Name 
20*5113495bSYour Name 
21*5113495bSYour Name 
22*5113495bSYour Name #ifndef _TCL_STATUS_RING_H_
23*5113495bSYour Name #define _TCL_STATUS_RING_H_
24*5113495bSYour Name #if !defined(__ASSEMBLER__)
25*5113495bSYour Name #endif
26*5113495bSYour Name 
27*5113495bSYour Name #define NUM_OF_DWORDS_TCL_STATUS_RING 8
28*5113495bSYour Name 
29*5113495bSYour Name struct tcl_status_ring {
30*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
31*5113495bSYour Name              uint32_t gse_ctrl                                                :  4,
32*5113495bSYour Name                       ase_fse_sel                                             :  1,
33*5113495bSYour Name                       cache_op_res                                            :  2,
34*5113495bSYour Name                       index_search_en                                         :  1,
35*5113495bSYour Name                       msdu_cnt_n                                              : 24;
36*5113495bSYour Name              uint32_t msdu_byte_cnt_n                                         : 32;
37*5113495bSYour Name              uint32_t msdu_timestmp_n                                         : 32;
38*5113495bSYour Name              uint32_t cmd_meta_data_31_0                                      : 32;
39*5113495bSYour Name              uint32_t cmd_meta_data_63_32                                     : 32;
40*5113495bSYour Name              uint32_t hash_indx_val                                           : 20,
41*5113495bSYour Name                       cache_set_num                                           :  4,
42*5113495bSYour Name                       reserved_5a                                             :  8;
43*5113495bSYour Name              uint32_t reserved_6a                                             : 32;
44*5113495bSYour Name              uint32_t reserved_7a                                             : 20,
45*5113495bSYour Name                       ring_id                                                 :  8,
46*5113495bSYour Name                       looping_count                                           :  4;
47*5113495bSYour Name #else
48*5113495bSYour Name              uint32_t msdu_cnt_n                                              : 24,
49*5113495bSYour Name                       index_search_en                                         :  1,
50*5113495bSYour Name                       cache_op_res                                            :  2,
51*5113495bSYour Name                       ase_fse_sel                                             :  1,
52*5113495bSYour Name                       gse_ctrl                                                :  4;
53*5113495bSYour Name              uint32_t msdu_byte_cnt_n                                         : 32;
54*5113495bSYour Name              uint32_t msdu_timestmp_n                                         : 32;
55*5113495bSYour Name              uint32_t cmd_meta_data_31_0                                      : 32;
56*5113495bSYour Name              uint32_t cmd_meta_data_63_32                                     : 32;
57*5113495bSYour Name              uint32_t reserved_5a                                             :  8,
58*5113495bSYour Name                       cache_set_num                                           :  4,
59*5113495bSYour Name                       hash_indx_val                                           : 20;
60*5113495bSYour Name              uint32_t reserved_6a                                             : 32;
61*5113495bSYour Name              uint32_t looping_count                                           :  4,
62*5113495bSYour Name                       ring_id                                                 :  8,
63*5113495bSYour Name                       reserved_7a                                             : 20;
64*5113495bSYour Name #endif
65*5113495bSYour Name };
66*5113495bSYour Name 
67*5113495bSYour Name #define TCL_STATUS_RING_GSE_CTRL_OFFSET                                             0x00000000
68*5113495bSYour Name #define TCL_STATUS_RING_GSE_CTRL_LSB                                                0
69*5113495bSYour Name #define TCL_STATUS_RING_GSE_CTRL_MSB                                                3
70*5113495bSYour Name #define TCL_STATUS_RING_GSE_CTRL_MASK                                               0x0000000f
71*5113495bSYour Name 
72*5113495bSYour Name #define TCL_STATUS_RING_ASE_FSE_SEL_OFFSET                                          0x00000000
73*5113495bSYour Name #define TCL_STATUS_RING_ASE_FSE_SEL_LSB                                             4
74*5113495bSYour Name #define TCL_STATUS_RING_ASE_FSE_SEL_MSB                                             4
75*5113495bSYour Name #define TCL_STATUS_RING_ASE_FSE_SEL_MASK                                            0x00000010
76*5113495bSYour Name 
77*5113495bSYour Name #define TCL_STATUS_RING_CACHE_OP_RES_OFFSET                                         0x00000000
78*5113495bSYour Name #define TCL_STATUS_RING_CACHE_OP_RES_LSB                                            5
79*5113495bSYour Name #define TCL_STATUS_RING_CACHE_OP_RES_MSB                                            6
80*5113495bSYour Name #define TCL_STATUS_RING_CACHE_OP_RES_MASK                                           0x00000060
81*5113495bSYour Name 
82*5113495bSYour Name #define TCL_STATUS_RING_INDEX_SEARCH_EN_OFFSET                                      0x00000000
83*5113495bSYour Name #define TCL_STATUS_RING_INDEX_SEARCH_EN_LSB                                         7
84*5113495bSYour Name #define TCL_STATUS_RING_INDEX_SEARCH_EN_MSB                                         7
85*5113495bSYour Name #define TCL_STATUS_RING_INDEX_SEARCH_EN_MASK                                        0x00000080
86*5113495bSYour Name 
87*5113495bSYour Name #define TCL_STATUS_RING_MSDU_CNT_N_OFFSET                                           0x00000000
88*5113495bSYour Name #define TCL_STATUS_RING_MSDU_CNT_N_LSB                                              8
89*5113495bSYour Name #define TCL_STATUS_RING_MSDU_CNT_N_MSB                                              31
90*5113495bSYour Name #define TCL_STATUS_RING_MSDU_CNT_N_MASK                                             0xffffff00
91*5113495bSYour Name 
92*5113495bSYour Name #define TCL_STATUS_RING_MSDU_BYTE_CNT_N_OFFSET                                      0x00000004
93*5113495bSYour Name #define TCL_STATUS_RING_MSDU_BYTE_CNT_N_LSB                                         0
94*5113495bSYour Name #define TCL_STATUS_RING_MSDU_BYTE_CNT_N_MSB                                         31
95*5113495bSYour Name #define TCL_STATUS_RING_MSDU_BYTE_CNT_N_MASK                                        0xffffffff
96*5113495bSYour Name 
97*5113495bSYour Name #define TCL_STATUS_RING_MSDU_TIMESTMP_N_OFFSET                                      0x00000008
98*5113495bSYour Name #define TCL_STATUS_RING_MSDU_TIMESTMP_N_LSB                                         0
99*5113495bSYour Name #define TCL_STATUS_RING_MSDU_TIMESTMP_N_MSB                                         31
100*5113495bSYour Name #define TCL_STATUS_RING_MSDU_TIMESTMP_N_MASK                                        0xffffffff
101*5113495bSYour Name 
102*5113495bSYour Name #define TCL_STATUS_RING_CMD_META_DATA_31_0_OFFSET                                   0x0000000c
103*5113495bSYour Name #define TCL_STATUS_RING_CMD_META_DATA_31_0_LSB                                      0
104*5113495bSYour Name #define TCL_STATUS_RING_CMD_META_DATA_31_0_MSB                                      31
105*5113495bSYour Name #define TCL_STATUS_RING_CMD_META_DATA_31_0_MASK                                     0xffffffff
106*5113495bSYour Name 
107*5113495bSYour Name #define TCL_STATUS_RING_CMD_META_DATA_63_32_OFFSET                                  0x00000010
108*5113495bSYour Name #define TCL_STATUS_RING_CMD_META_DATA_63_32_LSB                                     0
109*5113495bSYour Name #define TCL_STATUS_RING_CMD_META_DATA_63_32_MSB                                     31
110*5113495bSYour Name #define TCL_STATUS_RING_CMD_META_DATA_63_32_MASK                                    0xffffffff
111*5113495bSYour Name 
112*5113495bSYour Name #define TCL_STATUS_RING_HASH_INDX_VAL_OFFSET                                        0x00000014
113*5113495bSYour Name #define TCL_STATUS_RING_HASH_INDX_VAL_LSB                                           0
114*5113495bSYour Name #define TCL_STATUS_RING_HASH_INDX_VAL_MSB                                           19
115*5113495bSYour Name #define TCL_STATUS_RING_HASH_INDX_VAL_MASK                                          0x000fffff
116*5113495bSYour Name 
117*5113495bSYour Name #define TCL_STATUS_RING_CACHE_SET_NUM_OFFSET                                        0x00000014
118*5113495bSYour Name #define TCL_STATUS_RING_CACHE_SET_NUM_LSB                                           20
119*5113495bSYour Name #define TCL_STATUS_RING_CACHE_SET_NUM_MSB                                           23
120*5113495bSYour Name #define TCL_STATUS_RING_CACHE_SET_NUM_MASK                                          0x00f00000
121*5113495bSYour Name 
122*5113495bSYour Name #define TCL_STATUS_RING_RESERVED_5A_OFFSET                                          0x00000014
123*5113495bSYour Name #define TCL_STATUS_RING_RESERVED_5A_LSB                                             24
124*5113495bSYour Name #define TCL_STATUS_RING_RESERVED_5A_MSB                                             31
125*5113495bSYour Name #define TCL_STATUS_RING_RESERVED_5A_MASK                                            0xff000000
126*5113495bSYour Name 
127*5113495bSYour Name #define TCL_STATUS_RING_RESERVED_6A_OFFSET                                          0x00000018
128*5113495bSYour Name #define TCL_STATUS_RING_RESERVED_6A_LSB                                             0
129*5113495bSYour Name #define TCL_STATUS_RING_RESERVED_6A_MSB                                             31
130*5113495bSYour Name #define TCL_STATUS_RING_RESERVED_6A_MASK                                            0xffffffff
131*5113495bSYour Name 
132*5113495bSYour Name #define TCL_STATUS_RING_RESERVED_7A_OFFSET                                          0x0000001c
133*5113495bSYour Name #define TCL_STATUS_RING_RESERVED_7A_LSB                                             0
134*5113495bSYour Name #define TCL_STATUS_RING_RESERVED_7A_MSB                                             19
135*5113495bSYour Name #define TCL_STATUS_RING_RESERVED_7A_MASK                                            0x000fffff
136*5113495bSYour Name 
137*5113495bSYour Name #define TCL_STATUS_RING_RING_ID_OFFSET                                              0x0000001c
138*5113495bSYour Name #define TCL_STATUS_RING_RING_ID_LSB                                                 20
139*5113495bSYour Name #define TCL_STATUS_RING_RING_ID_MSB                                                 27
140*5113495bSYour Name #define TCL_STATUS_RING_RING_ID_MASK                                                0x0ff00000
141*5113495bSYour Name 
142*5113495bSYour Name #define TCL_STATUS_RING_LOOPING_COUNT_OFFSET                                        0x0000001c
143*5113495bSYour Name #define TCL_STATUS_RING_LOOPING_COUNT_LSB                                           28
144*5113495bSYour Name #define TCL_STATUS_RING_LOOPING_COUNT_MSB                                           31
145*5113495bSYour Name #define TCL_STATUS_RING_LOOPING_COUNT_MASK                                          0xf0000000
146*5113495bSYour Name 
147*5113495bSYour Name #endif
148