aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/8250/8250.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/serial/8250/8250.h')
-rw-r--r--drivers/tty/serial/8250/8250.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/drivers/tty/serial/8250/8250.h b/drivers/tty/serial/8250/8250.h
index 12caa1292b75..34eb676916fe 100644
--- a/drivers/tty/serial/8250/8250.h
+++ b/drivers/tty/serial/8250/8250.h
@@ -12,6 +12,35 @@
12 */ 12 */
13 13
14#include <linux/serial_8250.h> 14#include <linux/serial_8250.h>
15#include <linux/dmaengine.h>
16
17struct uart_8250_dma {
18 dma_filter_fn fn;
19 void *rx_param;
20 void *tx_param;
21
22 int rx_chan_id;
23 int tx_chan_id;
24
25 struct dma_slave_config rxconf;
26 struct dma_slave_config txconf;
27
28 struct dma_chan *rxchan;
29 struct dma_chan *txchan;
30
31 dma_addr_t rx_addr;
32 dma_addr_t tx_addr;
33
34 dma_cookie_t rx_cookie;
35 dma_cookie_t tx_cookie;
36
37 void *rx_buf;
38
39 size_t rx_size;
40 size_t tx_size;
41
42 unsigned char tx_running:1;
43};
15 44
16struct old_serial_port { 45struct old_serial_port {
17 unsigned int uart; 46 unsigned int uart;
@@ -143,3 +172,24 @@ static inline int is_omap1510_8250(struct uart_8250_port *pt)
143 return 0; 172 return 0;
144} 173}
145#endif 174#endif
175
176#ifdef CONFIG_SERIAL_8250_DMA
177extern int serial8250_tx_dma(struct uart_8250_port *);
178extern int serial8250_rx_dma(struct uart_8250_port *, unsigned int iir);
179extern int serial8250_request_dma(struct uart_8250_port *);
180extern void serial8250_release_dma(struct uart_8250_port *);
181#else
182static inline int serial8250_tx_dma(struct uart_8250_port *p)
183{
184 return -1;
185}
186static inline int serial8250_rx_dma(struct uart_8250_port *p, unsigned int iir)
187{
188 return -1;
189}
190static inline int serial8250_request_dma(struct uart_8250_port *p)
191{
192 return -1;
193}
194static inline void serial8250_release_dma(struct uart_8250_port *p) { }
195#endif