target-i386: cpu_x86_register() consolidate freeing resources
[qemu.git] / hw / etraxfs_dma.h
blob38104a67b53c68ba7b2ea3becc7108856a998ba3
1 #ifndef HW_ETRAXFS_DMA_H
2 #define HW_ETRAXFS_DMA_H 1
4 struct dma_context_metadata {
5 /* data descriptor md */
6 uint16_t metadata;
7 };
9 struct etraxfs_dma_client
11 /* DMA controller. */
12 int channel;
13 void *ctrl;
15 /* client. */
16 struct {
17 int (*push)(void *opaque, unsigned char *buf,
18 int len, bool eop);
19 void (*pull)(void *opaque);
20 void (*metadata_push)(void *opaque,
21 const struct dma_context_metadata *md);
22 void *opaque;
23 } client;
26 void *etraxfs_dmac_init(hwaddr base, int nr_channels);
27 void etraxfs_dmac_connect(void *opaque, int channel, qemu_irq *line,
28 int input);
29 void etraxfs_dmac_connect_client(void *opaque, int c,
30 struct etraxfs_dma_client *cl);
31 int etraxfs_dmac_input(struct etraxfs_dma_client *client,
32 void *buf, int len, int eop);
34 #endif