forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/drivers/net/ethernet/ti/davinci_cpdma.h
....@@ -1,16 +1,9 @@
1
+/* SPDX-License-Identifier: GPL-2.0 */
12 /*
23 * Texas Instruments CPDMA Driver
34 *
45 * Copyright (C) 2010 Texas Instruments
56 *
6
- * This program is free software; you can redistribute it and/or
7
- * modify it under the terms of the GNU General Public License as
8
- * published by the Free Software Foundation version 2.
9
- *
10
- * This program is distributed "as is" WITHOUT ANY WARRANTY of any
11
- * kind, whether express or implied; without even the implied warranty
12
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
147 */
158 #ifndef __DAVINCI_CPDMA_H__
169 #define __DAVINCI_CPDMA_H__
....@@ -34,8 +27,8 @@
3427 int num_chan;
3528 bool has_soft_reset;
3629 int min_packet_size;
37
- u32 desc_mem_phys;
38
- u32 desc_hw_addr;
30
+ dma_addr_t desc_mem_phys;
31
+ dma_addr_t desc_hw_addr;
3932 int desc_mem_size;
4033 int desc_align;
4134 u32 bus_freq_mhz;
....@@ -84,8 +77,14 @@
8477
8578 int cpdma_chan_get_stats(struct cpdma_chan *chan,
8679 struct cpdma_chan_stats *stats);
80
+int cpdma_chan_submit_mapped(struct cpdma_chan *chan, void *token,
81
+ dma_addr_t data, int len, int directed);
8782 int cpdma_chan_submit(struct cpdma_chan *chan, void *token, void *data,
8883 int len, int directed);
84
+int cpdma_chan_idle_submit_mapped(struct cpdma_chan *chan, void *token,
85
+ dma_addr_t data, int len, int directed);
86
+int cpdma_chan_idle_submit(struct cpdma_chan *chan, void *token, void *data,
87
+ int len, int directed);
8988 int cpdma_chan_process(struct cpdma_chan *chan, int quota);
9089
9190 int cpdma_ctlr_int_ctrl(struct cpdma_ctlr *ctlr, bool enable);
....@@ -117,8 +116,7 @@
117116 int cpdma_control_get(struct cpdma_ctlr *ctlr, int control);
118117 int cpdma_control_set(struct cpdma_ctlr *ctlr, int control, int value);
119118 int cpdma_get_num_rx_descs(struct cpdma_ctlr *ctlr);
120
-void cpdma_set_num_rx_descs(struct cpdma_ctlr *ctlr, int num_rx_desc);
119
+int cpdma_set_num_rx_descs(struct cpdma_ctlr *ctlr, int num_rx_desc);
121120 int cpdma_get_num_tx_descs(struct cpdma_ctlr *ctlr);
122
-int cpdma_chan_split_pool(struct cpdma_ctlr *ctlr);
123121
124122 #endif