Merge tag 'usb-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
[linux/fpc-iii.git] / arch / arm / include / asm / mach / dma.h
blob1506422af3832201938fa4e7265a71fad7e4d20e
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * arch/arm/include/asm/mach/dma.h
5 * Copyright (C) 1998-2000 Russell King
7 * This header file describes the interface between the generic DMA handler
8 * (dma.c) and the architecture-specific DMA backends (dma-*.c)
9 */
11 struct dma_struct;
12 typedef struct dma_struct dma_t;
14 struct dma_ops {
15 int (*request)(unsigned int, dma_t *); /* optional */
16 void (*free)(unsigned int, dma_t *); /* optional */
17 void (*enable)(unsigned int, dma_t *); /* mandatory */
18 void (*disable)(unsigned int, dma_t *); /* mandatory */
19 int (*residue)(unsigned int, dma_t *); /* optional */
20 int (*setspeed)(unsigned int, dma_t *, int); /* optional */
21 const char *type;
24 struct dma_struct {
25 void *addr; /* single DMA address */
26 unsigned long count; /* single DMA size */
27 struct scatterlist buf; /* single DMA */
28 int sgcount; /* number of DMA SG */
29 struct scatterlist *sg; /* DMA Scatter-Gather List */
31 unsigned int active:1; /* Transfer active */
32 unsigned int invalid:1; /* Address/Count changed */
34 unsigned int dma_mode; /* DMA mode */
35 int speed; /* DMA speed */
37 unsigned int lock; /* Device is allocated */
38 const char *device_id; /* Device name */
40 const struct dma_ops *d_ops;
44 * isa_dma_add - add an ISA-style DMA channel
46 extern int isa_dma_add(unsigned int, dma_t *dma);
49 * Add the ISA DMA controller. Always takes channels 0-7.
51 extern void isa_init_dma(void);