aboutsummaryrefslogtreecommitdiff
path: root/hw/etraxfs_dma.h
diff options
context:
space:
mode:
Diffstat (limited to 'hw/etraxfs_dma.h')
-rw-r--r--hw/etraxfs_dma.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/hw/etraxfs_dma.h b/hw/etraxfs_dma.h
new file mode 100644
index 0000000000..27719aeae4
--- /dev/null
+++ b/hw/etraxfs_dma.h
@@ -0,0 +1,24 @@
+struct etraxfs_dma_client
+{
+ /* DMA controller. */
+ int channel;
+ void *ctrl;
+
+ /* client. */
+ struct
+ {
+ int (*push)(void *opaque, unsigned char *buf, int len);
+ void (*pull)(void *opaque);
+ void *opaque;
+ } client;
+};
+
+void *etraxfs_dmac_init(CPUState *env, target_phys_addr_t base,
+ int nr_channels);
+void etraxfs_dmac_connect(void *opaque, int channel, qemu_irq *line,
+ int input);
+void etraxfs_dmac_connect_client(void *opaque, int c,
+ struct etraxfs_dma_client *cl);
+void etraxfs_dmac_run(void *opaque);
+int etraxfs_dmac_input(struct etraxfs_dma_client *client,
+ void *buf, int len, int eop);