xref: /wlan-driver/fw-api/hw/kiwi/v2/mon_destination_ring.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name 
2*5113495bSYour Name /*
3*5113495bSYour Name  * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
4*5113495bSYour Name  *
5*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for any
6*5113495bSYour Name  * purpose with or without fee is hereby granted, provided that the above
7*5113495bSYour Name  * copyright notice and this permission notice appear in all copies.
8*5113495bSYour Name  *
9*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10*5113495bSYour Name  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11*5113495bSYour Name  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12*5113495bSYour Name  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13*5113495bSYour Name  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14*5113495bSYour Name  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15*5113495bSYour Name  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16*5113495bSYour Name  */
17*5113495bSYour Name 
18*5113495bSYour Name 
19*5113495bSYour Name 
20*5113495bSYour Name #ifndef _MON_DESTINATION_RING_H_
21*5113495bSYour Name #define _MON_DESTINATION_RING_H_
22*5113495bSYour Name #if !defined(__ASSEMBLER__)
23*5113495bSYour Name #endif
24*5113495bSYour Name 
25*5113495bSYour Name #define NUM_OF_DWORDS_MON_DESTINATION_RING 4
26*5113495bSYour Name 
27*5113495bSYour Name struct mon_destination_ring {
28*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
29*5113495bSYour Name              uint32_t stat_buf_virt_addr_31_0                                 : 32;
30*5113495bSYour Name              uint32_t stat_buf_virt_addr_63_32                                : 32;
31*5113495bSYour Name              uint32_t ppdu_id                                                 : 32;
32*5113495bSYour Name              uint32_t end_offset                                              : 12,
33*5113495bSYour Name                       reserved_3a                                             :  4,
34*5113495bSYour Name                       end_reason                                              :  2,
35*5113495bSYour Name                       initiator                                               :  1,
36*5113495bSYour Name                       empty_descriptor                                        :  1,
37*5113495bSYour Name                       ring_id                                                 :  8,
38*5113495bSYour Name                       looping_count                                           :  4;
39*5113495bSYour Name #else
40*5113495bSYour Name              uint32_t stat_buf_virt_addr_31_0                                 : 32;
41*5113495bSYour Name              uint32_t stat_buf_virt_addr_63_32                                : 32;
42*5113495bSYour Name              uint32_t ppdu_id                                                 : 32;
43*5113495bSYour Name              uint32_t looping_count                                           :  4,
44*5113495bSYour Name                       ring_id                                                 :  8,
45*5113495bSYour Name                       empty_descriptor                                        :  1,
46*5113495bSYour Name                       initiator                                               :  1,
47*5113495bSYour Name                       end_reason                                              :  2,
48*5113495bSYour Name                       reserved_3a                                             :  4,
49*5113495bSYour Name                       end_offset                                              : 12;
50*5113495bSYour Name #endif
51*5113495bSYour Name };
52*5113495bSYour Name 
53*5113495bSYour Name #define MON_DESTINATION_RING_STAT_BUF_VIRT_ADDR_31_0_OFFSET                         0x00000000
54*5113495bSYour Name #define MON_DESTINATION_RING_STAT_BUF_VIRT_ADDR_31_0_LSB                            0
55*5113495bSYour Name #define MON_DESTINATION_RING_STAT_BUF_VIRT_ADDR_31_0_MSB                            31
56*5113495bSYour Name #define MON_DESTINATION_RING_STAT_BUF_VIRT_ADDR_31_0_MASK                           0xffffffff
57*5113495bSYour Name 
58*5113495bSYour Name #define MON_DESTINATION_RING_STAT_BUF_VIRT_ADDR_63_32_OFFSET                        0x00000004
59*5113495bSYour Name #define MON_DESTINATION_RING_STAT_BUF_VIRT_ADDR_63_32_LSB                           0
60*5113495bSYour Name #define MON_DESTINATION_RING_STAT_BUF_VIRT_ADDR_63_32_MSB                           31
61*5113495bSYour Name #define MON_DESTINATION_RING_STAT_BUF_VIRT_ADDR_63_32_MASK                          0xffffffff
62*5113495bSYour Name 
63*5113495bSYour Name #define MON_DESTINATION_RING_PPDU_ID_OFFSET                                         0x00000008
64*5113495bSYour Name #define MON_DESTINATION_RING_PPDU_ID_LSB                                            0
65*5113495bSYour Name #define MON_DESTINATION_RING_PPDU_ID_MSB                                            31
66*5113495bSYour Name #define MON_DESTINATION_RING_PPDU_ID_MASK                                           0xffffffff
67*5113495bSYour Name 
68*5113495bSYour Name #define MON_DESTINATION_RING_END_OFFSET_OFFSET                                      0x0000000c
69*5113495bSYour Name #define MON_DESTINATION_RING_END_OFFSET_LSB                                         0
70*5113495bSYour Name #define MON_DESTINATION_RING_END_OFFSET_MSB                                         11
71*5113495bSYour Name #define MON_DESTINATION_RING_END_OFFSET_MASK                                        0x00000fff
72*5113495bSYour Name 
73*5113495bSYour Name #define MON_DESTINATION_RING_RESERVED_3A_OFFSET                                     0x0000000c
74*5113495bSYour Name #define MON_DESTINATION_RING_RESERVED_3A_LSB                                        12
75*5113495bSYour Name #define MON_DESTINATION_RING_RESERVED_3A_MSB                                        15
76*5113495bSYour Name #define MON_DESTINATION_RING_RESERVED_3A_MASK                                       0x0000f000
77*5113495bSYour Name 
78*5113495bSYour Name #define MON_DESTINATION_RING_END_REASON_OFFSET                                      0x0000000c
79*5113495bSYour Name #define MON_DESTINATION_RING_END_REASON_LSB                                         16
80*5113495bSYour Name #define MON_DESTINATION_RING_END_REASON_MSB                                         17
81*5113495bSYour Name #define MON_DESTINATION_RING_END_REASON_MASK                                        0x00030000
82*5113495bSYour Name 
83*5113495bSYour Name #define MON_DESTINATION_RING_INITIATOR_OFFSET                                       0x0000000c
84*5113495bSYour Name #define MON_DESTINATION_RING_INITIATOR_LSB                                          18
85*5113495bSYour Name #define MON_DESTINATION_RING_INITIATOR_MSB                                          18
86*5113495bSYour Name #define MON_DESTINATION_RING_INITIATOR_MASK                                         0x00040000
87*5113495bSYour Name 
88*5113495bSYour Name #define MON_DESTINATION_RING_EMPTY_DESCRIPTOR_OFFSET                                0x0000000c
89*5113495bSYour Name #define MON_DESTINATION_RING_EMPTY_DESCRIPTOR_LSB                                   19
90*5113495bSYour Name #define MON_DESTINATION_RING_EMPTY_DESCRIPTOR_MSB                                   19
91*5113495bSYour Name #define MON_DESTINATION_RING_EMPTY_DESCRIPTOR_MASK                                  0x00080000
92*5113495bSYour Name 
93*5113495bSYour Name #define MON_DESTINATION_RING_RING_ID_OFFSET                                         0x0000000c
94*5113495bSYour Name #define MON_DESTINATION_RING_RING_ID_LSB                                            20
95*5113495bSYour Name #define MON_DESTINATION_RING_RING_ID_MSB                                            27
96*5113495bSYour Name #define MON_DESTINATION_RING_RING_ID_MASK                                           0x0ff00000
97*5113495bSYour Name 
98*5113495bSYour Name #define MON_DESTINATION_RING_LOOPING_COUNT_OFFSET                                   0x0000000c
99*5113495bSYour Name #define MON_DESTINATION_RING_LOOPING_COUNT_LSB                                      28
100*5113495bSYour Name #define MON_DESTINATION_RING_LOOPING_COUNT_MSB                                      31
101*5113495bSYour Name #define MON_DESTINATION_RING_LOOPING_COUNT_MASK                                     0xf0000000
102*5113495bSYour Name 
103*5113495bSYour Name #endif
104