18c2ecf20Sopenharmony_ci/*
28c2ecf20Sopenharmony_ci * Copyright (c) 2013 Eugene Krasnikov <k.eugene.e@gmail.com>
38c2ecf20Sopenharmony_ci *
48c2ecf20Sopenharmony_ci * Permission to use, copy, modify, and/or distribute this software for any
58c2ecf20Sopenharmony_ci * purpose with or without fee is hereby granted, provided that the above
68c2ecf20Sopenharmony_ci * copyright notice and this permission notice appear in all copies.
78c2ecf20Sopenharmony_ci *
88c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
98c2ecf20Sopenharmony_ci * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
108c2ecf20Sopenharmony_ci * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
118c2ecf20Sopenharmony_ci * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
128c2ecf20Sopenharmony_ci * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
138c2ecf20Sopenharmony_ci * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
148c2ecf20Sopenharmony_ci * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
158c2ecf20Sopenharmony_ci */
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci#ifndef _DXE_H_
188c2ecf20Sopenharmony_ci#define _DXE_H_
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci#include "wcn36xx.h"
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ci/*
238c2ecf20Sopenharmony_ciTX_LOW	= DMA0
248c2ecf20Sopenharmony_ciTX_HIGH	= DMA4
258c2ecf20Sopenharmony_ciRX_LOW	= DMA1
268c2ecf20Sopenharmony_ciRX_HIGH	= DMA3
278c2ecf20Sopenharmony_ciH2H_TEST_RX_TX = DMA2
288c2ecf20Sopenharmony_ci*/
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ci/* DXE registers */
318c2ecf20Sopenharmony_ci#define WCN36XX_DXE_MEM_REG			0
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci#define WCN36XX_CCU_DXE_INT_SELECT_RIVA		0x310
348c2ecf20Sopenharmony_ci#define WCN36XX_CCU_DXE_INT_SELECT_PRONTO	0x10dc
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ci/* Descriptor valid */
378c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CTRL_VLD		BIT(0)
388c2ecf20Sopenharmony_ci/* End of packet */
398c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CTRL_EOP		BIT(3)
408c2ecf20Sopenharmony_ci/* BD handling bit */
418c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CTRL_BDH		BIT(4)
428c2ecf20Sopenharmony_ci/* Source is a queue */
438c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CTRL_SIQ		BIT(5)
448c2ecf20Sopenharmony_ci/* Destination is a queue */
458c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CTRL_DIQ		BIT(6)
468c2ecf20Sopenharmony_ci/* Pointer address is a queue */
478c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CTRL_PIQ		BIT(7)
488c2ecf20Sopenharmony_ci/* Release PDU when done */
498c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CTRL_PDU_REL	BIT(8)
508c2ecf20Sopenharmony_ci/* STOP channel processing */
518c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CTRL_STOP		BIT(16)
528c2ecf20Sopenharmony_ci/* INT on descriptor done */
538c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CTRL_INT		BIT(17)
548c2ecf20Sopenharmony_ci/* Endian byte swap enable */
558c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CTRL_SWAP		BIT(20)
568c2ecf20Sopenharmony_ci/* Master endianness */
578c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CTRL_ENDIANNESS	BIT(21)
588c2ecf20Sopenharmony_ci
598c2ecf20Sopenharmony_ci/* Transfer type */
608c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CTRL_XTYPE_SHIFT 1
618c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CTRL_XTYPE_MASK GENMASK(2, WCN36xx_DXE_CTRL_XTYPE_SHIFT)
628c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CTRL_XTYPE_SET(x)	((x) << WCN36xx_DXE_CTRL_XTYPE_SHIFT)
638c2ecf20Sopenharmony_ci
648c2ecf20Sopenharmony_ci/* BMU Threshold select */
658c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CTRL_BTHLD_SEL_SHIFT 9
668c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CTRL_BTHLD_SEL_MASK GENMASK(12, WCN36xx_DXE_CTRL_BTHLD_SEL_SHIFT)
678c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CTRL_BTHLD_SEL_SET(x) ((x) << WCN36xx_DXE_CTRL_BTHLD_SEL_SHIFT)
688c2ecf20Sopenharmony_ci
698c2ecf20Sopenharmony_ci/* Priority */
708c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CTRL_PRIO_SHIFT 13
718c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CTRL_PRIO_MASK GENMASK(15, WCN36xx_DXE_CTRL_PRIO_SHIFT)
728c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CTRL_PRIO_SET(x) ((x) << WCN36xx_DXE_CTRL_PRIO_SHIFT)
738c2ecf20Sopenharmony_ci
748c2ecf20Sopenharmony_ci/* BD Template index */
758c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CTRL_BDT_IDX_SHIFT 18
768c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CTRL_BDT_IDX_MASK GENMASK(19, WCN36xx_DXE_CTRL_BDT_IDX_SHIFT)
778c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CTRL_BDT_IDX_SET(x) ((x) << WCN36xx_DXE_CTRL_BDT_IDX_SHIFT)
788c2ecf20Sopenharmony_ci
798c2ecf20Sopenharmony_ci/* Transfer types: */
808c2ecf20Sopenharmony_ci/* Host to host */
818c2ecf20Sopenharmony_ci#define WCN36xx_DXE_XTYPE_H2H (0)
828c2ecf20Sopenharmony_ci/* Host to BMU */
838c2ecf20Sopenharmony_ci#define WCN36xx_DXE_XTYPE_H2B (2)
848c2ecf20Sopenharmony_ci/* BMU to host */
858c2ecf20Sopenharmony_ci#define WCN36xx_DXE_XTYPE_B2H (3)
868c2ecf20Sopenharmony_ci
878c2ecf20Sopenharmony_ci#define WCN36XX_DXE_CTRL_TX_L	(WCN36xx_DXE_CTRL_XTYPE_SET(WCN36xx_DXE_XTYPE_H2B) | \
888c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_DIQ | WCN36xx_DXE_CTRL_BTHLD_SEL_SET(5) | \
898c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_PRIO_SET(4) | WCN36xx_DXE_CTRL_INT | \
908c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_SWAP | WCN36xx_DXE_CTRL_ENDIANNESS)
918c2ecf20Sopenharmony_ci
928c2ecf20Sopenharmony_ci#define WCN36XX_DXE_CTRL_TX_H	 (WCN36xx_DXE_CTRL_XTYPE_SET(WCN36xx_DXE_XTYPE_H2B) | \
938c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_DIQ | WCN36xx_DXE_CTRL_BTHLD_SEL_SET(7) | \
948c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_PRIO_SET(6) | WCN36xx_DXE_CTRL_INT | \
958c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_SWAP | WCN36xx_DXE_CTRL_ENDIANNESS)
968c2ecf20Sopenharmony_ci
978c2ecf20Sopenharmony_ci#define WCN36XX_DXE_CTRL_RX_L	(WCN36xx_DXE_CTRL_VLD | \
988c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_XTYPE_SET(WCN36xx_DXE_XTYPE_B2H) | \
998c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_EOP | WCN36xx_DXE_CTRL_SIQ | \
1008c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_PDU_REL | WCN36xx_DXE_CTRL_BTHLD_SEL_SET(6) | \
1018c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_PRIO_SET(5) | WCN36xx_DXE_CTRL_INT | \
1028c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_SWAP)
1038c2ecf20Sopenharmony_ci
1048c2ecf20Sopenharmony_ci#define WCN36XX_DXE_CTRL_RX_H	(WCN36xx_DXE_CTRL_VLD | \
1058c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_XTYPE_SET(WCN36xx_DXE_XTYPE_B2H) | \
1068c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_EOP | WCN36xx_DXE_CTRL_SIQ | \
1078c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_PDU_REL |  WCN36xx_DXE_CTRL_BTHLD_SEL_SET(8) | \
1088c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_PRIO_SET(6) | WCN36xx_DXE_CTRL_INT | \
1098c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_SWAP)
1108c2ecf20Sopenharmony_ci
1118c2ecf20Sopenharmony_ci#define WCN36XX_DXE_CTRL_TX_H_BD	(WCN36xx_DXE_CTRL_VLD | \
1128c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_XTYPE_SET(WCN36xx_DXE_XTYPE_H2B) | \
1138c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_DIQ | WCN36xx_DXE_CTRL_BTHLD_SEL_SET(7) | \
1148c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_PRIO_SET(6) | WCN36xx_DXE_CTRL_SWAP | \
1158c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_ENDIANNESS)
1168c2ecf20Sopenharmony_ci
1178c2ecf20Sopenharmony_ci#define WCN36XX_DXE_CTRL_TX_H_SKB	(WCN36xx_DXE_CTRL_VLD | \
1188c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_XTYPE_SET(WCN36xx_DXE_XTYPE_H2B) | \
1198c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_EOP | WCN36xx_DXE_CTRL_DIQ | \
1208c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_BTHLD_SEL_SET(7) | WCN36xx_DXE_CTRL_PRIO_SET(6) | \
1218c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_INT | WCN36xx_DXE_CTRL_SWAP | \
1228c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_ENDIANNESS)
1238c2ecf20Sopenharmony_ci
1248c2ecf20Sopenharmony_ci#define WCN36XX_DXE_CTRL_TX_L_BD	 (WCN36xx_DXE_CTRL_VLD | \
1258c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_XTYPE_SET(WCN36xx_DXE_XTYPE_H2B) | \
1268c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_DIQ | WCN36xx_DXE_CTRL_BTHLD_SEL_SET(5) | \
1278c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_PRIO_SET(4) | WCN36xx_DXE_CTRL_SWAP | \
1288c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_ENDIANNESS)
1298c2ecf20Sopenharmony_ci
1308c2ecf20Sopenharmony_ci#define WCN36XX_DXE_CTRL_TX_L_SKB	(WCN36xx_DXE_CTRL_VLD | \
1318c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_XTYPE_SET(WCN36xx_DXE_XTYPE_H2B) | \
1328c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_EOP | WCN36xx_DXE_CTRL_DIQ | \
1338c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_BTHLD_SEL_SET(5) | WCN36xx_DXE_CTRL_PRIO_SET(4) | \
1348c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_INT | WCN36xx_DXE_CTRL_SWAP | \
1358c2ecf20Sopenharmony_ci	WCN36xx_DXE_CTRL_ENDIANNESS)
1368c2ecf20Sopenharmony_ci
1378c2ecf20Sopenharmony_ci/* TODO This must calculated properly but not hardcoded */
1388c2ecf20Sopenharmony_ci#define WCN36XX_DXE_WQ_TX_L			0x17
1398c2ecf20Sopenharmony_ci#define WCN36XX_DXE_WQ_TX_H			0x17
1408c2ecf20Sopenharmony_ci#define WCN36XX_DXE_WQ_RX_L			0xB
1418c2ecf20Sopenharmony_ci#define WCN36XX_DXE_WQ_RX_H			0x4
1428c2ecf20Sopenharmony_ci
1438c2ecf20Sopenharmony_ci/* Channel enable or restart */
1448c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CH_CTRL_EN			BIT(0)
1458c2ecf20Sopenharmony_ci/* End of packet bit */
1468c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CH_CTRL_EOP			BIT(3)
1478c2ecf20Sopenharmony_ci/* BD Handling bit */
1488c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CH_CTRL_BDH			BIT(4)
1498c2ecf20Sopenharmony_ci/* Source is queue */
1508c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CH_CTRL_SIQ			BIT(5)
1518c2ecf20Sopenharmony_ci/* Destination is queue */
1528c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CH_CTRL_DIQ			BIT(6)
1538c2ecf20Sopenharmony_ci/* Pointer descriptor is queue */
1548c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CH_CTRL_PIQ			BIT(7)
1558c2ecf20Sopenharmony_ci/* Relase PDU when done */
1568c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CH_CTRL_PDU_REL		BIT(8)
1578c2ecf20Sopenharmony_ci/* Stop channel processing */
1588c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CH_CTRL_STOP		BIT(16)
1598c2ecf20Sopenharmony_ci/* Enable external descriptor interrupt */
1608c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CH_CTRL_INE_ED		BIT(17)
1618c2ecf20Sopenharmony_ci/* Enable channel interrupt on errors */
1628c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CH_CTRL_INE_ERR		BIT(18)
1638c2ecf20Sopenharmony_ci/* Enable Channel interrupt when done */
1648c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CH_CTRL_INE_DONE	BIT(19)
1658c2ecf20Sopenharmony_ci/* External descriptor enable */
1668c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CH_CTRL_EDEN		BIT(20)
1678c2ecf20Sopenharmony_ci/* Wait for valid bit */
1688c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CH_CTRL_EDVEN		BIT(21)
1698c2ecf20Sopenharmony_ci/* Endianness is little endian*/
1708c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CH_CTRL_ENDIANNESS	BIT(26)
1718c2ecf20Sopenharmony_ci/* Abort transfer */
1728c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CH_CTRL_ABORT		BIT(27)
1738c2ecf20Sopenharmony_ci/* Long descriptor format */
1748c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CH_CTRL_DFMT		BIT(28)
1758c2ecf20Sopenharmony_ci/* Endian byte swap enable */
1768c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CH_CTRL_SWAP		BIT(31)
1778c2ecf20Sopenharmony_ci
1788c2ecf20Sopenharmony_ci/* Transfer type */
1798c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CH_CTRL_XTYPE_SHIFT 1
1808c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CH_CTRL_XTYPE_MASK GENMASK(2, WCN36xx_DXE_CH_CTRL_XTYPE_SHIFT)
1818c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CH_CTRL_XTYPE_SET(x)	((x) << WCN36xx_DXE_CH_CTRL_XTYPE_SHIFT)
1828c2ecf20Sopenharmony_ci
1838c2ecf20Sopenharmony_ci/* Channel BMU Threshold select */
1848c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CH_CTRL_BTHLD_SEL_SHIFT 9
1858c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CH_CTRL_BTHLD_SEL_MASK GENMASK(12, WCN36xx_DXE_CH_CTRL_BTHLD_SEL_SHIFT)
1868c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CH_CTRL_BTHLD_SEL_SET(x) ((x) << WCN36xx_DXE_CH_CTRL_BTHLD_SEL_SHIFT)
1878c2ecf20Sopenharmony_ci
1888c2ecf20Sopenharmony_ci/* Channel Priority */
1898c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CH_CTRL_PRIO_SHIFT 13
1908c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CH_CTRL_PRIO_MASK GENMASK(15, WCN36xx_DXE_CH_CTRL_PRIO_SHIFT)
1918c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CH_CTRL_PRIO_SET(x) ((x) << WCN36xx_DXE_CH_CTRL_PRIO_SHIFT)
1928c2ecf20Sopenharmony_ci
1938c2ecf20Sopenharmony_ci/* Counter select */
1948c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CH_CTRL_SEL_SHIFT 22
1958c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CH_CTRL_SEL_MASK GENMASK(25, WCN36xx_DXE_CH_CTRL_SEL_SHIFT)
1968c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CH_CTRL_SEL_SET(x)	((x) << WCN36xx_DXE_CH_CTRL_SEL_SHIFT)
1978c2ecf20Sopenharmony_ci
1988c2ecf20Sopenharmony_ci/* Channel BD template index */
1998c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CH_CTRL_BDT_IDX_SHIFT 29
2008c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CH_CTRL_BDT_IDX_MASK GENMASK(30, WCN36xx_DXE_CH_CTRL_BDT_IDX_SHIFT)
2018c2ecf20Sopenharmony_ci#define WCN36xx_DXE_CH_CTRL_BDT_IDX_SET(x)	((x) << WCN36xx_DXE_CH_CTRL_BDT_IDX_SHIFT)
2028c2ecf20Sopenharmony_ci
2038c2ecf20Sopenharmony_ci/* DXE default control register values */
2048c2ecf20Sopenharmony_ci#define WCN36XX_DXE_CH_DEFAULT_CTL_RX_L (WCN36xx_DXE_CH_CTRL_EN | \
2058c2ecf20Sopenharmony_ci		WCN36xx_DXE_CH_CTRL_XTYPE_SET(WCN36xx_DXE_XTYPE_B2H) | \
2068c2ecf20Sopenharmony_ci		WCN36xx_DXE_CH_CTRL_EOP | WCN36xx_DXE_CH_CTRL_SIQ | \
2078c2ecf20Sopenharmony_ci		WCN36xx_DXE_CH_CTRL_PDU_REL | WCN36xx_DXE_CH_CTRL_BTHLD_SEL_SET(6) | \
2088c2ecf20Sopenharmony_ci		WCN36xx_DXE_CH_CTRL_PRIO_SET(5) | WCN36xx_DXE_CH_CTRL_INE_ED | \
2098c2ecf20Sopenharmony_ci		WCN36xx_DXE_CH_CTRL_INE_ERR | WCN36xx_DXE_CH_CTRL_INE_DONE | \
2108c2ecf20Sopenharmony_ci		WCN36xx_DXE_CH_CTRL_EDEN | WCN36xx_DXE_CH_CTRL_EDVEN | \
2118c2ecf20Sopenharmony_ci		WCN36xx_DXE_CH_CTRL_SEL_SET(1) | WCN36xx_DXE_CH_CTRL_ENDIANNESS | \
2128c2ecf20Sopenharmony_ci		WCN36xx_DXE_CH_CTRL_SWAP)
2138c2ecf20Sopenharmony_ci
2148c2ecf20Sopenharmony_ci#define WCN36XX_DXE_CH_DEFAULT_CTL_RX_H (WCN36xx_DXE_CH_CTRL_EN | \
2158c2ecf20Sopenharmony_ci		WCN36xx_DXE_CH_CTRL_XTYPE_SET(WCN36xx_DXE_XTYPE_B2H) | \
2168c2ecf20Sopenharmony_ci		WCN36xx_DXE_CH_CTRL_EOP | WCN36xx_DXE_CH_CTRL_SIQ | \
2178c2ecf20Sopenharmony_ci		WCN36xx_DXE_CH_CTRL_PDU_REL | WCN36xx_DXE_CH_CTRL_BTHLD_SEL_SET(8) | \
2188c2ecf20Sopenharmony_ci		WCN36xx_DXE_CH_CTRL_PRIO_SET(6) | WCN36xx_DXE_CH_CTRL_INE_ED | \
2198c2ecf20Sopenharmony_ci		WCN36xx_DXE_CH_CTRL_INE_ERR | WCN36xx_DXE_CH_CTRL_INE_DONE | \
2208c2ecf20Sopenharmony_ci		WCN36xx_DXE_CH_CTRL_EDEN | WCN36xx_DXE_CH_CTRL_EDVEN | \
2218c2ecf20Sopenharmony_ci		WCN36xx_DXE_CH_CTRL_SEL_SET(3) | WCN36xx_DXE_CH_CTRL_ENDIANNESS | \
2228c2ecf20Sopenharmony_ci		WCN36xx_DXE_CH_CTRL_SWAP)
2238c2ecf20Sopenharmony_ci
2248c2ecf20Sopenharmony_ci#define WCN36XX_DXE_CH_DEFAULT_CTL_TX_H	(WCN36xx_DXE_CH_CTRL_EN | \
2258c2ecf20Sopenharmony_ci		WCN36xx_DXE_CH_CTRL_XTYPE_SET(WCN36xx_DXE_XTYPE_H2B) | \
2268c2ecf20Sopenharmony_ci		WCN36xx_DXE_CH_CTRL_EOP | WCN36xx_DXE_CH_CTRL_DIQ | \
2278c2ecf20Sopenharmony_ci		WCN36xx_DXE_CH_CTRL_PDU_REL | WCN36xx_DXE_CH_CTRL_BTHLD_SEL_SET(7) | \
2288c2ecf20Sopenharmony_ci		WCN36xx_DXE_CH_CTRL_PRIO_SET(6) | WCN36xx_DXE_CH_CTRL_INE_ED | \
2298c2ecf20Sopenharmony_ci		WCN36xx_DXE_CH_CTRL_INE_ERR | WCN36xx_DXE_CH_CTRL_INE_DONE | \
2308c2ecf20Sopenharmony_ci		WCN36xx_DXE_CH_CTRL_EDEN | WCN36xx_DXE_CH_CTRL_EDVEN | \
2318c2ecf20Sopenharmony_ci		WCN36xx_DXE_CH_CTRL_SEL_SET(4) | WCN36xx_DXE_CH_CTRL_ENDIANNESS | \
2328c2ecf20Sopenharmony_ci		WCN36xx_DXE_CH_CTRL_SWAP)
2338c2ecf20Sopenharmony_ci
2348c2ecf20Sopenharmony_ci#define WCN36XX_DXE_CH_DEFAULT_CTL_TX_L (WCN36xx_DXE_CH_CTRL_EN | \
2358c2ecf20Sopenharmony_ci		WCN36xx_DXE_CH_CTRL_XTYPE_SET(WCN36xx_DXE_XTYPE_H2B) | \
2368c2ecf20Sopenharmony_ci		WCN36xx_DXE_CH_CTRL_EOP | WCN36xx_DXE_CH_CTRL_DIQ | \
2378c2ecf20Sopenharmony_ci		WCN36xx_DXE_CH_CTRL_PDU_REL | WCN36xx_DXE_CH_CTRL_BTHLD_SEL_SET(5) | \
2388c2ecf20Sopenharmony_ci		WCN36xx_DXE_CH_CTRL_PRIO_SET(4) | WCN36xx_DXE_CH_CTRL_INE_ED | \
2398c2ecf20Sopenharmony_ci		WCN36xx_DXE_CH_CTRL_INE_ERR | WCN36xx_DXE_CH_CTRL_INE_DONE | \
2408c2ecf20Sopenharmony_ci		WCN36xx_DXE_CH_CTRL_EDEN | WCN36xx_DXE_CH_CTRL_EDVEN | \
2418c2ecf20Sopenharmony_ci		WCN36xx_DXE_CH_CTRL_SEL_SET(0) | WCN36xx_DXE_CH_CTRL_ENDIANNESS | \
2428c2ecf20Sopenharmony_ci		WCN36xx_DXE_CH_CTRL_SWAP)
2438c2ecf20Sopenharmony_ci
2448c2ecf20Sopenharmony_ci/* Common DXE registers */
2458c2ecf20Sopenharmony_ci#define WCN36XX_DXE_MEM_CSR			(WCN36XX_DXE_MEM_REG + 0x00)
2468c2ecf20Sopenharmony_ci#define WCN36XX_DXE_REG_CSR_RESET		(WCN36XX_DXE_MEM_REG + 0x00)
2478c2ecf20Sopenharmony_ci#define WCN36XX_DXE_ENCH_ADDR			(WCN36XX_DXE_MEM_REG + 0x04)
2488c2ecf20Sopenharmony_ci#define WCN36XX_DXE_REG_CH_EN			(WCN36XX_DXE_MEM_REG + 0x08)
2498c2ecf20Sopenharmony_ci#define WCN36XX_DXE_REG_CH_DONE			(WCN36XX_DXE_MEM_REG + 0x0C)
2508c2ecf20Sopenharmony_ci#define WCN36XX_DXE_REG_CH_ERR			(WCN36XX_DXE_MEM_REG + 0x10)
2518c2ecf20Sopenharmony_ci#define WCN36XX_DXE_INT_MASK_REG		(WCN36XX_DXE_MEM_REG + 0x18)
2528c2ecf20Sopenharmony_ci#define WCN36XX_DXE_INT_SRC_RAW_REG		(WCN36XX_DXE_MEM_REG + 0x20)
2538c2ecf20Sopenharmony_ci	/* #define WCN36XX_DXE_INT_CH6_MASK	0x00000040 */
2548c2ecf20Sopenharmony_ci	/* #define WCN36XX_DXE_INT_CH5_MASK	0x00000020 */
2558c2ecf20Sopenharmony_ci	#define WCN36XX_DXE_INT_CH4_MASK	0x00000010
2568c2ecf20Sopenharmony_ci	#define WCN36XX_DXE_INT_CH3_MASK	0x00000008
2578c2ecf20Sopenharmony_ci	/* #define WCN36XX_DXE_INT_CH2_MASK	0x00000004 */
2588c2ecf20Sopenharmony_ci	#define WCN36XX_DXE_INT_CH1_MASK	0x00000002
2598c2ecf20Sopenharmony_ci	#define WCN36XX_DXE_INT_CH0_MASK	0x00000001
2608c2ecf20Sopenharmony_ci#define WCN36XX_DXE_0_INT_CLR			(WCN36XX_DXE_MEM_REG + 0x30)
2618c2ecf20Sopenharmony_ci#define WCN36XX_DXE_0_INT_ED_CLR		(WCN36XX_DXE_MEM_REG + 0x34)
2628c2ecf20Sopenharmony_ci#define WCN36XX_DXE_0_INT_DONE_CLR		(WCN36XX_DXE_MEM_REG + 0x38)
2638c2ecf20Sopenharmony_ci#define WCN36XX_DXE_0_INT_ERR_CLR		(WCN36XX_DXE_MEM_REG + 0x3C)
2648c2ecf20Sopenharmony_ci
2658c2ecf20Sopenharmony_ci#define WCN36XX_CH_STAT_INT_DONE_MASK   0x00008000
2668c2ecf20Sopenharmony_ci#define WCN36XX_CH_STAT_INT_ERR_MASK    0x00004000
2678c2ecf20Sopenharmony_ci#define WCN36XX_CH_STAT_INT_ED_MASK     0x00002000
2688c2ecf20Sopenharmony_ci
2698c2ecf20Sopenharmony_ci#define WCN36XX_DXE_0_CH0_STATUS		(WCN36XX_DXE_MEM_REG + 0x404)
2708c2ecf20Sopenharmony_ci#define WCN36XX_DXE_0_CH1_STATUS		(WCN36XX_DXE_MEM_REG + 0x444)
2718c2ecf20Sopenharmony_ci#define WCN36XX_DXE_0_CH2_STATUS		(WCN36XX_DXE_MEM_REG + 0x484)
2728c2ecf20Sopenharmony_ci#define WCN36XX_DXE_0_CH3_STATUS		(WCN36XX_DXE_MEM_REG + 0x4C4)
2738c2ecf20Sopenharmony_ci#define WCN36XX_DXE_0_CH4_STATUS		(WCN36XX_DXE_MEM_REG + 0x504)
2748c2ecf20Sopenharmony_ci
2758c2ecf20Sopenharmony_ci#define WCN36XX_DXE_REG_RESET			0x5c89
2768c2ecf20Sopenharmony_ci
2778c2ecf20Sopenharmony_ci/* Temporary BMU Workqueue 4 */
2788c2ecf20Sopenharmony_ci#define WCN36XX_DXE_BMU_WQ_RX_LOW		0xB
2798c2ecf20Sopenharmony_ci#define WCN36XX_DXE_BMU_WQ_RX_HIGH		0x4
2808c2ecf20Sopenharmony_ci/* DMA channel offset */
2818c2ecf20Sopenharmony_ci#define WCN36XX_DXE_TX_LOW_OFFSET		0x400
2828c2ecf20Sopenharmony_ci#define WCN36XX_DXE_TX_HIGH_OFFSET		0x500
2838c2ecf20Sopenharmony_ci#define WCN36XX_DXE_RX_LOW_OFFSET		0x440
2848c2ecf20Sopenharmony_ci#define WCN36XX_DXE_RX_HIGH_OFFSET		0x4C0
2858c2ecf20Sopenharmony_ci
2868c2ecf20Sopenharmony_ci/* Address of the next DXE descriptor */
2878c2ecf20Sopenharmony_ci#define WCN36XX_DXE_CH_NEXT_DESC_ADDR		0x001C
2888c2ecf20Sopenharmony_ci#define WCN36XX_DXE_CH_NEXT_DESC_ADDR_TX_L	(WCN36XX_DXE_MEM_REG + \
2898c2ecf20Sopenharmony_ci						 WCN36XX_DXE_TX_LOW_OFFSET + \
2908c2ecf20Sopenharmony_ci						 WCN36XX_DXE_CH_NEXT_DESC_ADDR)
2918c2ecf20Sopenharmony_ci#define WCN36XX_DXE_CH_NEXT_DESC_ADDR_TX_H	(WCN36XX_DXE_MEM_REG + \
2928c2ecf20Sopenharmony_ci						 WCN36XX_DXE_TX_HIGH_OFFSET + \
2938c2ecf20Sopenharmony_ci						 WCN36XX_DXE_CH_NEXT_DESC_ADDR)
2948c2ecf20Sopenharmony_ci#define WCN36XX_DXE_CH_NEXT_DESC_ADDR_RX_L	(WCN36XX_DXE_MEM_REG + \
2958c2ecf20Sopenharmony_ci						 WCN36XX_DXE_RX_LOW_OFFSET + \
2968c2ecf20Sopenharmony_ci						 WCN36XX_DXE_CH_NEXT_DESC_ADDR)
2978c2ecf20Sopenharmony_ci#define WCN36XX_DXE_CH_NEXT_DESC_ADDR_RX_H	(WCN36XX_DXE_MEM_REG + \
2988c2ecf20Sopenharmony_ci						 WCN36XX_DXE_RX_HIGH_OFFSET + \
2998c2ecf20Sopenharmony_ci						 WCN36XX_DXE_CH_NEXT_DESC_ADDR)
3008c2ecf20Sopenharmony_ci
3018c2ecf20Sopenharmony_ci/* DXE Descriptor source address */
3028c2ecf20Sopenharmony_ci#define WCN36XX_DXE_CH_SRC_ADDR			0x000C
3038c2ecf20Sopenharmony_ci#define WCN36XX_DXE_CH_SRC_ADDR_RX_L		(WCN36XX_DXE_MEM_REG + \
3048c2ecf20Sopenharmony_ci						 WCN36XX_DXE_RX_LOW_OFFSET + \
3058c2ecf20Sopenharmony_ci						 WCN36XX_DXE_CH_SRC_ADDR)
3068c2ecf20Sopenharmony_ci#define WCN36XX_DXE_CH_SRC_ADDR_RX_H		(WCN36XX_DXE_MEM_REG + \
3078c2ecf20Sopenharmony_ci						 WCN36XX_DXE_RX_HIGH_OFFSET + \
3088c2ecf20Sopenharmony_ci						 WCN36XX_DXE_CH_SRC_ADDR)
3098c2ecf20Sopenharmony_ci
3108c2ecf20Sopenharmony_ci/* DXE Descriptor address destination address */
3118c2ecf20Sopenharmony_ci#define WCN36XX_DXE_CH_DEST_ADDR		0x0014
3128c2ecf20Sopenharmony_ci#define WCN36XX_DXE_CH_DEST_ADDR_TX_L		(WCN36XX_DXE_MEM_REG + \
3138c2ecf20Sopenharmony_ci						 WCN36XX_DXE_TX_LOW_OFFSET + \
3148c2ecf20Sopenharmony_ci						 WCN36XX_DXE_CH_DEST_ADDR)
3158c2ecf20Sopenharmony_ci#define WCN36XX_DXE_CH_DEST_ADDR_TX_H		(WCN36XX_DXE_MEM_REG + \
3168c2ecf20Sopenharmony_ci						 WCN36XX_DXE_TX_HIGH_OFFSET + \
3178c2ecf20Sopenharmony_ci						 WCN36XX_DXE_CH_DEST_ADDR)
3188c2ecf20Sopenharmony_ci#define WCN36XX_DXE_CH_DEST_ADDR_RX_L		(WCN36XX_DXE_MEM_REG + \
3198c2ecf20Sopenharmony_ci						 WCN36XX_DXE_RX_LOW_OFFSET + \
3208c2ecf20Sopenharmony_ci						 WCN36XX_DXE_CH_DEST_ADDR)
3218c2ecf20Sopenharmony_ci#define WCN36XX_DXE_CH_DEST_ADDR_RX_H		(WCN36XX_DXE_MEM_REG + \
3228c2ecf20Sopenharmony_ci						 WCN36XX_DXE_RX_HIGH_OFFSET + \
3238c2ecf20Sopenharmony_ci						 WCN36XX_DXE_CH_DEST_ADDR)
3248c2ecf20Sopenharmony_ci
3258c2ecf20Sopenharmony_ci/* Interrupt status */
3268c2ecf20Sopenharmony_ci#define WCN36XX_DXE_CH_STATUS_REG_ADDR		0x0004
3278c2ecf20Sopenharmony_ci#define WCN36XX_DXE_CH_STATUS_REG_ADDR_TX_L	(WCN36XX_DXE_MEM_REG + \
3288c2ecf20Sopenharmony_ci						 WCN36XX_DXE_TX_LOW_OFFSET + \
3298c2ecf20Sopenharmony_ci						 WCN36XX_DXE_CH_STATUS_REG_ADDR)
3308c2ecf20Sopenharmony_ci#define WCN36XX_DXE_CH_STATUS_REG_ADDR_TX_H	(WCN36XX_DXE_MEM_REG + \
3318c2ecf20Sopenharmony_ci						 WCN36XX_DXE_TX_HIGH_OFFSET + \
3328c2ecf20Sopenharmony_ci						 WCN36XX_DXE_CH_STATUS_REG_ADDR)
3338c2ecf20Sopenharmony_ci#define WCN36XX_DXE_CH_STATUS_REG_ADDR_RX_L	(WCN36XX_DXE_MEM_REG + \
3348c2ecf20Sopenharmony_ci						 WCN36XX_DXE_RX_LOW_OFFSET + \
3358c2ecf20Sopenharmony_ci						 WCN36XX_DXE_CH_STATUS_REG_ADDR)
3368c2ecf20Sopenharmony_ci#define WCN36XX_DXE_CH_STATUS_REG_ADDR_RX_H	(WCN36XX_DXE_MEM_REG + \
3378c2ecf20Sopenharmony_ci						 WCN36XX_DXE_RX_HIGH_OFFSET + \
3388c2ecf20Sopenharmony_ci						 WCN36XX_DXE_CH_STATUS_REG_ADDR)
3398c2ecf20Sopenharmony_ci
3408c2ecf20Sopenharmony_ci
3418c2ecf20Sopenharmony_ci/* DXE default control register */
3428c2ecf20Sopenharmony_ci#define WCN36XX_DXE_REG_CTL_RX_L		(WCN36XX_DXE_MEM_REG + \
3438c2ecf20Sopenharmony_ci						 WCN36XX_DXE_RX_LOW_OFFSET)
3448c2ecf20Sopenharmony_ci#define WCN36XX_DXE_REG_CTL_RX_H		(WCN36XX_DXE_MEM_REG + \
3458c2ecf20Sopenharmony_ci						 WCN36XX_DXE_RX_HIGH_OFFSET)
3468c2ecf20Sopenharmony_ci#define WCN36XX_DXE_REG_CTL_TX_H		(WCN36XX_DXE_MEM_REG + \
3478c2ecf20Sopenharmony_ci						 WCN36XX_DXE_TX_HIGH_OFFSET)
3488c2ecf20Sopenharmony_ci#define WCN36XX_DXE_REG_CTL_TX_L		(WCN36XX_DXE_MEM_REG + \
3498c2ecf20Sopenharmony_ci						 WCN36XX_DXE_TX_LOW_OFFSET)
3508c2ecf20Sopenharmony_ci
3518c2ecf20Sopenharmony_ci#define WCN36XX_SMSM_WLAN_TX_ENABLE		0x00000400
3528c2ecf20Sopenharmony_ci#define WCN36XX_SMSM_WLAN_TX_RINGS_EMPTY	0x00000200
3538c2ecf20Sopenharmony_ci
3548c2ecf20Sopenharmony_ci
3558c2ecf20Sopenharmony_ci/* Interrupt control channel mask */
3568c2ecf20Sopenharmony_ci#define WCN36XX_INT_MASK_CHAN_TX_L		0x00000001
3578c2ecf20Sopenharmony_ci#define WCN36XX_INT_MASK_CHAN_RX_L		0x00000002
3588c2ecf20Sopenharmony_ci#define WCN36XX_INT_MASK_CHAN_RX_H		0x00000008
3598c2ecf20Sopenharmony_ci#define WCN36XX_INT_MASK_CHAN_TX_H		0x00000010
3608c2ecf20Sopenharmony_ci
3618c2ecf20Sopenharmony_ci#define WCN36XX_BD_CHUNK_SIZE			128
3628c2ecf20Sopenharmony_ci
3638c2ecf20Sopenharmony_ci#define WCN36XX_PKT_SIZE			0xF20
3648c2ecf20Sopenharmony_cienum wcn36xx_dxe_ch_type {
3658c2ecf20Sopenharmony_ci	WCN36XX_DXE_CH_TX_L,
3668c2ecf20Sopenharmony_ci	WCN36XX_DXE_CH_TX_H,
3678c2ecf20Sopenharmony_ci	WCN36XX_DXE_CH_RX_L,
3688c2ecf20Sopenharmony_ci	WCN36XX_DXE_CH_RX_H
3698c2ecf20Sopenharmony_ci};
3708c2ecf20Sopenharmony_ci
3718c2ecf20Sopenharmony_ci/* amount of descriptors per channel */
3728c2ecf20Sopenharmony_cienum wcn36xx_dxe_ch_desc_num {
3738c2ecf20Sopenharmony_ci	WCN36XX_DXE_CH_DESC_NUMB_TX_L		= 128,
3748c2ecf20Sopenharmony_ci	WCN36XX_DXE_CH_DESC_NUMB_TX_H		= 10,
3758c2ecf20Sopenharmony_ci	WCN36XX_DXE_CH_DESC_NUMB_RX_L		= 512,
3768c2ecf20Sopenharmony_ci	WCN36XX_DXE_CH_DESC_NUMB_RX_H		= 40
3778c2ecf20Sopenharmony_ci};
3788c2ecf20Sopenharmony_ci
3798c2ecf20Sopenharmony_ci/**
3808c2ecf20Sopenharmony_ci * struct wcn36xx_dxe_desc - describes descriptor of one DXE buffer
3818c2ecf20Sopenharmony_ci *
3828c2ecf20Sopenharmony_ci * @ctrl: is a union that consists of following bits:
3838c2ecf20Sopenharmony_ci * union {
3848c2ecf20Sopenharmony_ci *	u32	valid		:1; //0 = DMA stop, 1 = DMA continue with this
3858c2ecf20Sopenharmony_ci *				    //descriptor
3868c2ecf20Sopenharmony_ci *	u32	transfer_type	:2; //0 = Host to Host space
3878c2ecf20Sopenharmony_ci *	u32	eop		:1; //End of Packet
3888c2ecf20Sopenharmony_ci *	u32	bd_handling	:1; //if transferType = Host to BMU, then 0
3898c2ecf20Sopenharmony_ci *				    // means first 128 bytes contain BD, and 1
3908c2ecf20Sopenharmony_ci *				    // means create new empty BD
3918c2ecf20Sopenharmony_ci *	u32	siq		:1; // SIQ
3928c2ecf20Sopenharmony_ci *	u32	diq		:1; // DIQ
3938c2ecf20Sopenharmony_ci *	u32	pdu_rel		:1; //0 = don't release BD and PDUs when done,
3948c2ecf20Sopenharmony_ci *				    // 1 = release them
3958c2ecf20Sopenharmony_ci *	u32	bthld_sel	:4; //BMU Threshold Select
3968c2ecf20Sopenharmony_ci *	u32	prio		:3; //Specifies the priority level to use for
3978c2ecf20Sopenharmony_ci *				    // the transfer
3988c2ecf20Sopenharmony_ci *	u32	stop_channel	:1; //1 = DMA stops processing further, channel
3998c2ecf20Sopenharmony_ci *				    //requires re-enabling after this
4008c2ecf20Sopenharmony_ci *	u32	intr		:1; //Interrupt on Descriptor Done
4018c2ecf20Sopenharmony_ci *	u32	rsvd		:1; //reserved
4028c2ecf20Sopenharmony_ci *	u32	size		:14;//14 bits used - ignored for BMU transfers,
4038c2ecf20Sopenharmony_ci *				    //only used for host to host transfers?
4048c2ecf20Sopenharmony_ci * } ctrl;
4058c2ecf20Sopenharmony_ci */
4068c2ecf20Sopenharmony_cistruct wcn36xx_dxe_desc {
4078c2ecf20Sopenharmony_ci	u32	ctrl;
4088c2ecf20Sopenharmony_ci	u32	fr_len;
4098c2ecf20Sopenharmony_ci
4108c2ecf20Sopenharmony_ci	u32	src_addr_l;
4118c2ecf20Sopenharmony_ci	u32	dst_addr_l;
4128c2ecf20Sopenharmony_ci	u32	phy_next_l;
4138c2ecf20Sopenharmony_ci	u32	src_addr_h;
4148c2ecf20Sopenharmony_ci	u32	dst_addr_h;
4158c2ecf20Sopenharmony_ci	u32	phy_next_h;
4168c2ecf20Sopenharmony_ci} __packed;
4178c2ecf20Sopenharmony_ci
4188c2ecf20Sopenharmony_ci/* DXE Control block */
4198c2ecf20Sopenharmony_cistruct wcn36xx_dxe_ctl {
4208c2ecf20Sopenharmony_ci	struct wcn36xx_dxe_ctl	*next;
4218c2ecf20Sopenharmony_ci	struct wcn36xx_dxe_desc	*desc;
4228c2ecf20Sopenharmony_ci	unsigned int		desc_phy_addr;
4238c2ecf20Sopenharmony_ci	int			ctl_blk_order;
4248c2ecf20Sopenharmony_ci	struct sk_buff		*skb;
4258c2ecf20Sopenharmony_ci	void			*bd_cpu_addr;
4268c2ecf20Sopenharmony_ci	dma_addr_t		bd_phy_addr;
4278c2ecf20Sopenharmony_ci};
4288c2ecf20Sopenharmony_ci
4298c2ecf20Sopenharmony_cistruct wcn36xx_dxe_ch {
4308c2ecf20Sopenharmony_ci	spinlock_t			lock;	/* protects head/tail ptrs */
4318c2ecf20Sopenharmony_ci	enum wcn36xx_dxe_ch_type	ch_type;
4328c2ecf20Sopenharmony_ci	void				*cpu_addr;
4338c2ecf20Sopenharmony_ci	dma_addr_t			dma_addr;
4348c2ecf20Sopenharmony_ci	enum wcn36xx_dxe_ch_desc_num	desc_num;
4358c2ecf20Sopenharmony_ci	/* DXE control block ring */
4368c2ecf20Sopenharmony_ci	struct wcn36xx_dxe_ctl		*head_blk_ctl;
4378c2ecf20Sopenharmony_ci	struct wcn36xx_dxe_ctl		*tail_blk_ctl;
4388c2ecf20Sopenharmony_ci
4398c2ecf20Sopenharmony_ci	/* DXE channel specific configs */
4408c2ecf20Sopenharmony_ci	u32				dxe_wq;
4418c2ecf20Sopenharmony_ci	u32				ctrl_bd;
4428c2ecf20Sopenharmony_ci	u32				ctrl_skb;
4438c2ecf20Sopenharmony_ci	u32				reg_ctrl;
4448c2ecf20Sopenharmony_ci	u32				def_ctrl;
4458c2ecf20Sopenharmony_ci};
4468c2ecf20Sopenharmony_ci
4478c2ecf20Sopenharmony_ci/* Memory Pool for BD headers */
4488c2ecf20Sopenharmony_cistruct wcn36xx_dxe_mem_pool {
4498c2ecf20Sopenharmony_ci	int		chunk_size;
4508c2ecf20Sopenharmony_ci	void		*virt_addr;
4518c2ecf20Sopenharmony_ci	dma_addr_t	phy_addr;
4528c2ecf20Sopenharmony_ci};
4538c2ecf20Sopenharmony_ci
4548c2ecf20Sopenharmony_cistruct wcn36xx_tx_bd;
4558c2ecf20Sopenharmony_cistruct wcn36xx_vif;
4568c2ecf20Sopenharmony_ciint wcn36xx_dxe_allocate_mem_pools(struct wcn36xx *wcn);
4578c2ecf20Sopenharmony_civoid wcn36xx_dxe_free_mem_pools(struct wcn36xx *wcn);
4588c2ecf20Sopenharmony_civoid wcn36xx_dxe_rx_frame(struct wcn36xx *wcn);
4598c2ecf20Sopenharmony_ciint wcn36xx_dxe_alloc_ctl_blks(struct wcn36xx *wcn);
4608c2ecf20Sopenharmony_civoid wcn36xx_dxe_free_ctl_blks(struct wcn36xx *wcn);
4618c2ecf20Sopenharmony_ciint wcn36xx_dxe_init(struct wcn36xx *wcn);
4628c2ecf20Sopenharmony_civoid wcn36xx_dxe_deinit(struct wcn36xx *wcn);
4638c2ecf20Sopenharmony_ciint wcn36xx_dxe_init_channels(struct wcn36xx *wcn);
4648c2ecf20Sopenharmony_ciint wcn36xx_dxe_tx_frame(struct wcn36xx *wcn,
4658c2ecf20Sopenharmony_ci			 struct wcn36xx_vif *vif_priv,
4668c2ecf20Sopenharmony_ci			 struct wcn36xx_tx_bd *bd,
4678c2ecf20Sopenharmony_ci			 struct sk_buff *skb,
4688c2ecf20Sopenharmony_ci			 bool is_low);
4698c2ecf20Sopenharmony_civoid wcn36xx_dxe_tx_ack_ind(struct wcn36xx *wcn, u32 status);
4708c2ecf20Sopenharmony_ci#endif	/* _DXE_H_ */
471