1 /* SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2021, MediaTek Inc.
4 * Copyright (c) 2021-2022, Intel Corporation.
7 * Haijun Liu <haijun.liu@mediatek.com>
8 * Eliot Lee <eliot.lee@intel.com>
9 * Ricardo Martinez <ricardo.martinez@linux.intel.com>
12 * Amir Hanania <amir.hanania@intel.com>
13 * Chiranjeevi Rapolu <chiranjeevi.rapolu@intel.com>
14 * Moises Veleta <moises.veleta@intel.com>
15 * Sreehari Kancharla <sreehari.kancharla@intel.com>
18 #ifndef __T7XX_HIF_DPMA_TX_H__
19 #define __T7XX_HIF_DPMA_TX_H__
21 #include <linux/bits.h>
22 #include <linux/skbuff.h>
23 #include <linux/types.h>
25 #include "t7xx_hif_dpmaif.h"
27 #define DPMAIF_TX_DEFAULT_QUEUE 0
45 #define DRB_HDR_DATA_LEN GENMASK(31, 16)
46 #define DRB_HDR_RESERVED GENMASK(15, 3)
47 #define DRB_HDR_CONT BIT(2)
48 #define DRB_HDR_DTYP GENMASK(1, 0)
50 #define DRB_MSG_DW2_RES GENMASK(31, 30)
51 #define DRB_MSG_L4_CHK BIT(29)
52 #define DRB_MSG_IP_CHK BIT(28)
53 #define DRB_MSG_RESERVED BIT(27)
54 #define DRB_MSG_NETWORK_TYPE GENMASK(26, 24)
55 #define DRB_MSG_CHANNEL_ID GENMASK(23, 16)
56 #define DRB_MSG_COUNT_L GENMASK(15, 0)
58 struct dpmaif_drb_skb {
61 unsigned int data_len;
68 int t7xx_dpmaif_tx_send_skb(struct dpmaif_ctrl *dpmaif_ctrl, unsigned int txq_number,
70 void t7xx_dpmaif_tx_thread_rel(struct dpmaif_ctrl *dpmaif_ctrl);
71 int t7xx_dpmaif_tx_thread_init(struct dpmaif_ctrl *dpmaif_ctrl);
72 void t7xx_dpmaif_txq_free(struct dpmaif_tx_queue *txq);
73 void t7xx_dpmaif_irq_tx_done(struct dpmaif_ctrl *dpmaif_ctrl, unsigned int que_mask);
74 int t7xx_dpmaif_txq_init(struct dpmaif_tx_queue *txq);
75 void t7xx_dpmaif_tx_stop(struct dpmaif_ctrl *dpmaif_ctrl);
76 void t7xx_dpmaif_tx_clear(struct dpmaif_ctrl *dpmaif_ctrl);
78 #endif /* __T7XX_HIF_DPMA_TX_H__ */