treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / sparc / include / asm / ebus_dma.h
blob75563ed090f5d92b25d431362908f29cc5a464fc
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __ASM_SPARC_EBUS_DMA_H
3 #define __ASM_SPARC_EBUS_DMA_H
5 struct ebus_dma_info {
6 spinlock_t lock;
7 void __iomem *regs;
9 unsigned int flags;
10 #define EBUS_DMA_FLAG_USE_EBDMA_HANDLER 0x00000001
11 #define EBUS_DMA_FLAG_TCI_DISABLE 0x00000002
13 /* These are only valid is EBUS_DMA_FLAG_USE_EBDMA_HANDLER is
14 * set.
16 void (*callback)(struct ebus_dma_info *p, int event, void *cookie);
17 void *client_cookie;
18 unsigned int irq;
19 #define EBUS_DMA_EVENT_ERROR 1
20 #define EBUS_DMA_EVENT_DMA 2
21 #define EBUS_DMA_EVENT_DEVICE 4
23 unsigned char name[64];
26 int ebus_dma_register(struct ebus_dma_info *p);
27 int ebus_dma_irq_enable(struct ebus_dma_info *p, int on);
28 void ebus_dma_unregister(struct ebus_dma_info *p);
29 int ebus_dma_request(struct ebus_dma_info *p, dma_addr_t bus_addr,
30 size_t len);
31 void ebus_dma_prepare(struct ebus_dma_info *p, int write);
32 unsigned int ebus_dma_residue(struct ebus_dma_info *p);
33 unsigned int ebus_dma_addr(struct ebus_dma_info *p);
34 void ebus_dma_enable(struct ebus_dma_info *p, int on);
36 #endif /* __ASM_SPARC_EBUS_DMA_H */