1 
2 /*
3  * Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved.
4  * SPDX-License-Identifier: ISC
5  */
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 #ifndef _MON_DESTINATION_RING_H_
20 #define _MON_DESTINATION_RING_H_
21 #if !defined(__ASSEMBLER__)
22 #endif
23 
24 #define NUM_OF_DWORDS_MON_DESTINATION_RING 4
25 
26 
27 struct mon_destination_ring {
28 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
29              uint32_t stat_buf_virt_addr_31_0                                 : 32;
30              uint32_t stat_buf_virt_addr_63_32                                : 32;
31              uint32_t ppdu_id                                                 : 32;
32              uint32_t end_offset                                              : 12,
33                       reserved_3a                                             :  4,
34                       end_reason                                              :  2,
35                       initiator                                               :  1,
36                       empty_descriptor                                        :  1,
37                       ring_id                                                 :  8,
38                       looping_count                                           :  4;
39 #else
40              uint32_t stat_buf_virt_addr_31_0                                 : 32;
41              uint32_t stat_buf_virt_addr_63_32                                : 32;
42              uint32_t ppdu_id                                                 : 32;
43              uint32_t looping_count                                           :  4,
44                       ring_id                                                 :  8,
45                       empty_descriptor                                        :  1,
46                       initiator                                               :  1,
47                       end_reason                                              :  2,
48                       reserved_3a                                             :  4,
49                       end_offset                                              : 12;
50 #endif
51 };
52 
53 
54 
55 
56 #define MON_DESTINATION_RING_STAT_BUF_VIRT_ADDR_31_0_OFFSET                         0x00000000
57 #define MON_DESTINATION_RING_STAT_BUF_VIRT_ADDR_31_0_LSB                            0
58 #define MON_DESTINATION_RING_STAT_BUF_VIRT_ADDR_31_0_MSB                            31
59 #define MON_DESTINATION_RING_STAT_BUF_VIRT_ADDR_31_0_MASK                           0xffffffff
60 
61 
62 
63 
64 #define MON_DESTINATION_RING_STAT_BUF_VIRT_ADDR_63_32_OFFSET                        0x00000004
65 #define MON_DESTINATION_RING_STAT_BUF_VIRT_ADDR_63_32_LSB                           0
66 #define MON_DESTINATION_RING_STAT_BUF_VIRT_ADDR_63_32_MSB                           31
67 #define MON_DESTINATION_RING_STAT_BUF_VIRT_ADDR_63_32_MASK                          0xffffffff
68 
69 
70 
71 
72 #define MON_DESTINATION_RING_PPDU_ID_OFFSET                                         0x00000008
73 #define MON_DESTINATION_RING_PPDU_ID_LSB                                            0
74 #define MON_DESTINATION_RING_PPDU_ID_MSB                                            31
75 #define MON_DESTINATION_RING_PPDU_ID_MASK                                           0xffffffff
76 
77 
78 
79 
80 #define MON_DESTINATION_RING_END_OFFSET_OFFSET                                      0x0000000c
81 #define MON_DESTINATION_RING_END_OFFSET_LSB                                         0
82 #define MON_DESTINATION_RING_END_OFFSET_MSB                                         11
83 #define MON_DESTINATION_RING_END_OFFSET_MASK                                        0x00000fff
84 
85 
86 
87 
88 #define MON_DESTINATION_RING_RESERVED_3A_OFFSET                                     0x0000000c
89 #define MON_DESTINATION_RING_RESERVED_3A_LSB                                        12
90 #define MON_DESTINATION_RING_RESERVED_3A_MSB                                        15
91 #define MON_DESTINATION_RING_RESERVED_3A_MASK                                       0x0000f000
92 
93 
94 
95 
96 #define MON_DESTINATION_RING_END_REASON_OFFSET                                      0x0000000c
97 #define MON_DESTINATION_RING_END_REASON_LSB                                         16
98 #define MON_DESTINATION_RING_END_REASON_MSB                                         17
99 #define MON_DESTINATION_RING_END_REASON_MASK                                        0x00030000
100 
101 
102 
103 
104 #define MON_DESTINATION_RING_INITIATOR_OFFSET                                       0x0000000c
105 #define MON_DESTINATION_RING_INITIATOR_LSB                                          18
106 #define MON_DESTINATION_RING_INITIATOR_MSB                                          18
107 #define MON_DESTINATION_RING_INITIATOR_MASK                                         0x00040000
108 
109 
110 
111 
112 #define MON_DESTINATION_RING_EMPTY_DESCRIPTOR_OFFSET                                0x0000000c
113 #define MON_DESTINATION_RING_EMPTY_DESCRIPTOR_LSB                                   19
114 #define MON_DESTINATION_RING_EMPTY_DESCRIPTOR_MSB                                   19
115 #define MON_DESTINATION_RING_EMPTY_DESCRIPTOR_MASK                                  0x00080000
116 
117 
118 
119 
120 #define MON_DESTINATION_RING_RING_ID_OFFSET                                         0x0000000c
121 #define MON_DESTINATION_RING_RING_ID_LSB                                            20
122 #define MON_DESTINATION_RING_RING_ID_MSB                                            27
123 #define MON_DESTINATION_RING_RING_ID_MASK                                           0x0ff00000
124 
125 
126 
127 
128 #define MON_DESTINATION_RING_LOOPING_COUNT_OFFSET                                   0x0000000c
129 #define MON_DESTINATION_RING_LOOPING_COUNT_LSB                                      28
130 #define MON_DESTINATION_RING_LOOPING_COUNT_MSB                                      31
131 #define MON_DESTINATION_RING_LOOPING_COUNT_MASK                                     0xf0000000
132 
133 
134 
135 #endif
136