summaryrefslogtreecommitdiffstats
path: root/arch/sparc/include/asm/ebus_dma.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-08-29 23:10:21 -0700
committerDavid S. Miller <davem@davemloft.net>2008-08-29 23:10:21 -0700
commitaae7fb87ec4d2df6cb551670b1765cf4e5795a3b (patch)
treeb1e48948473cf321059c3916e51f11290199aebf /arch/sparc/include/asm/ebus_dma.h
parent39890072b320e7731b105b459cee1320957adbc7 (diff)
downloadop-kernel-dev-aae7fb87ec4d2df6cb551670b1765cf4e5795a3b.zip
op-kernel-dev-aae7fb87ec4d2df6cb551670b1765cf4e5795a3b.tar.gz
sparc: Move EBUS DMA interfaces into seperate header file.
These have no dependencies on the EBUS probing layer, the clients setup the registers and all of those details. The EBUS DMA layer just programs and manages the DMA controller found in EBUS. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include/asm/ebus_dma.h')
-rw-r--r--arch/sparc/include/asm/ebus_dma.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/arch/sparc/include/asm/ebus_dma.h b/arch/sparc/include/asm/ebus_dma.h
new file mode 100644
index 0000000..f07a5b5
--- /dev/null
+++ b/arch/sparc/include/asm/ebus_dma.h
@@ -0,0 +1,35 @@
+#ifndef __ASM_SPARC_EBUS_DMA_H
+#define __ASM_SPARC_EBUS_DMA_H
+
+struct ebus_dma_info {
+ spinlock_t lock;
+ void __iomem *regs;
+
+ unsigned int flags;
+#define EBUS_DMA_FLAG_USE_EBDMA_HANDLER 0x00000001
+#define EBUS_DMA_FLAG_TCI_DISABLE 0x00000002
+
+ /* These are only valid is EBUS_DMA_FLAG_USE_EBDMA_HANDLER is
+ * set.
+ */
+ void (*callback)(struct ebus_dma_info *p, int event, void *cookie);
+ void *client_cookie;
+ unsigned int irq;
+#define EBUS_DMA_EVENT_ERROR 1
+#define EBUS_DMA_EVENT_DMA 2
+#define EBUS_DMA_EVENT_DEVICE 4
+
+ unsigned char name[64];
+};
+
+extern int ebus_dma_register(struct ebus_dma_info *p);
+extern int ebus_dma_irq_enable(struct ebus_dma_info *p, int on);
+extern void ebus_dma_unregister(struct ebus_dma_info *p);
+extern int ebus_dma_request(struct ebus_dma_info *p, dma_addr_t bus_addr,
+ size_t len);
+extern void ebus_dma_prepare(struct ebus_dma_info *p, int write);
+extern unsigned int ebus_dma_residue(struct ebus_dma_info *p);
+extern unsigned int ebus_dma_addr(struct ebus_dma_info *p);
+extern void ebus_dma_enable(struct ebus_dma_info *p, int on);
+
+#endif /* __ASM_SPARC_EBUS_DMA_H */
OpenPOWER on IntegriCloud