xref: /wlan-driver/fw-api/hw/qca6390/v1/wbm_buffer_ring.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2018 The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for
5  * any purpose with or without fee is hereby granted, provided that the
6  * above copyright notice and this permission notice appear in all
7  * copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16  * PERFORMANCE OF THIS SOFTWARE.
17  */
18 #ifndef _WBM_BUFFER_RING_H_
19 #define _WBM_BUFFER_RING_H_
20 #if !defined(__ASSEMBLER__)
21 #endif
22 
23 #include "buffer_addr_info.h"
24 
25 // ################ START SUMMARY #################
26 //
27 //	Dword	Fields
28 //	0-1	struct buffer_addr_info buf_addr_info;
29 //
30 // ################ END SUMMARY #################
31 
32 #define NUM_OF_DWORDS_WBM_BUFFER_RING 2
33 
34 struct wbm_buffer_ring {
35     struct            buffer_addr_info                       buf_addr_info;
36 };
37 
38 /*
39 
40 struct buffer_addr_info buf_addr_info
41 
42 			Consumer: WBM
43 
44 			Producer: WBM
45 
46 
47 
48 			Details of the physical address of the buffer + source
49 			buffer owner +  some SW meta data.
50 
51 			All modules getting this buffer address info, shall keep
52 			all the 64 bits of info in this descriptor together and
53 			eventually all 64 bits shall be given back to WMB when the
54 			buffer is released.
55 */
56 
57 #define WBM_BUFFER_RING_0_BUFFER_ADDR_INFO_BUF_ADDR_INFO_OFFSET      0x00000000
58 #define WBM_BUFFER_RING_0_BUFFER_ADDR_INFO_BUF_ADDR_INFO_LSB         0
59 #define WBM_BUFFER_RING_0_BUFFER_ADDR_INFO_BUF_ADDR_INFO_MASK        0xffffffff
60 #define WBM_BUFFER_RING_1_BUFFER_ADDR_INFO_BUF_ADDR_INFO_OFFSET      0x00000004
61 #define WBM_BUFFER_RING_1_BUFFER_ADDR_INFO_BUF_ADDR_INFO_LSB         0
62 #define WBM_BUFFER_RING_1_BUFFER_ADDR_INFO_BUF_ADDR_INFO_MASK        0xffffffff
63 
64 
65 #endif // _WBM_BUFFER_RING_H_
66