XenevaOS
Loading...
Searching...
No Matches
dmaengine.h
Go to the documentation of this file.
1#ifndef __LINUX_DMAENGINE_H__
2#define __LINUX_DMAENGINE_H__
3
4/*
5 * DCL <linux/dmaengine.h> -- the four names struct uart_8250_dma spells out,
6 * and nothing else.
7 *
8 * mainline's copy is 56 KB: the dma_device/dma_chan objects, the channel
9 * request/release and slave-capability machinery, cyclic descriptors,
10 * interleaved transfers, the whole engine. Xeneva has no DMA layer, and 8250
11 * on every board in scope (iMX8MP, RPi3b+, QEMU's pl011/16550) runs PIO.
12 * What the driver does need is for the *struct* to parse, because
13 * 8250.h:20-44 embeds two dma_filter_fn, two dma_slave_config and two
14 * dma_cookie_t as fields of uart_8250_dma -- fields whose values only matter
15 * if CONFIG_SERIAL_8250_DMA code is compiled in, which it is not.
16 *
17 * So the four declarations below are copied from mainline rather than
18 * reduced, for the reason <linux/serial_core.h>'s header comment gives: a
19 * struct that disagrees with its vendor source by one field compiles cleanly
20 * and then reads the wrong offset, and a type whose layout is invented here
21 * is the same trap in a smaller box. The rest of the engine is absent because
22 * nothing calls it -- see the same rule at the top of <linux/cleanup.h>.
23 *
24 * upstream include/linux/dmaengine.h (mainline v7.2)
25 * extracted: enum dma_transfer_direction, enum dma_slave_buswidth,
26 * dma_cookie_t, dma_filter_fn, struct dma_slave_config
27 */
28
29/* DCL has no DMA controller; the type exists because dma_filter_fn's
30 * signature names it, and every channel is NULL. */
31struct dma_chan;
32
40
53
55
56typedef bool (*dma_filter_fn)(struct dma_chan *chan, void *filter_param);
57
72
73#endif /* __LINUX_DMAENGINE_H__ */
#define bool
Definition stdbool.h:35
dma_transfer_direction
Definition dmaengine.h:33
@ DMA_DEV_TO_MEM
Definition dmaengine.h:36
@ DMA_DEV_TO_DEV
Definition dmaengine.h:37
@ DMA_TRANS_NONE
Definition dmaengine.h:38
@ DMA_MEM_TO_DEV
Definition dmaengine.h:35
@ DMA_MEM_TO_MEM
Definition dmaengine.h:34
bool(* dma_filter_fn)(struct dma_chan *chan, void *filter_param)
Definition dmaengine.h:56
s32 dma_cookie_t
Definition dmaengine.h:54
dma_slave_buswidth
Definition dmaengine.h:41
@ DMA_SLAVE_BUSWIDTH_128_BYTES
Definition dmaengine.h:51
@ DMA_SLAVE_BUSWIDTH_16_BYTES
Definition dmaengine.h:48
@ DMA_SLAVE_BUSWIDTH_3_BYTES
Definition dmaengine.h:45
@ DMA_SLAVE_BUSWIDTH_4_BYTES
Definition dmaengine.h:46
@ DMA_SLAVE_BUSWIDTH_1_BYTE
Definition dmaengine.h:43
@ DMA_SLAVE_BUSWIDTH_8_BYTES
Definition dmaengine.h:47
@ DMA_SLAVE_BUSWIDTH_64_BYTES
Definition dmaengine.h:50
@ DMA_SLAVE_BUSWIDTH_32_BYTES
Definition dmaengine.h:49
@ DMA_SLAVE_BUSWIDTH_2_BYTES
Definition dmaengine.h:44
@ DMA_SLAVE_BUSWIDTH_UNDEFINED
Definition dmaengine.h:42
uintptr_t phys_addr_t
Definition kernel.h:40
int32_t s32
Definition kernel.h:20
uint32_t u32
Definition kernel.h:16
Definition dmaengine.h:58
bool device_fc
Definition dmaengine.h:68
enum dma_transfer_direction direction
Definition dmaengine.h:59
enum dma_slave_buswidth src_addr_width
Definition dmaengine.h:62
void * peripheral_config
Definition dmaengine.h:69
u32 dst_maxburst
Definition dmaengine.h:65
u32 dst_port_window_size
Definition dmaengine.h:67
phys_addr_t dst_addr
Definition dmaengine.h:61
phys_addr_t src_addr
Definition dmaengine.h:60
u32 src_maxburst
Definition dmaengine.h:64
size_t peripheral_size
Definition dmaengine.h:70
u32 src_port_window_size
Definition dmaengine.h:66
enum dma_slave_buswidth dst_addr_width
Definition dmaengine.h:63