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