openpic: merge mpic and openpic timer handling
[qemu/agraf.git] / hw / etraxfs_dma.h
blob3fef80fae10327a2aac14142deaa87d9e8440906
1 struct dma_context_metadata {
2 /* data descriptor md */
3 uint16_t metadata;
4 };
6 struct etraxfs_dma_client
8 /* DMA controller. */
9 int channel;
10 void *ctrl;
12 /* client. */
13 struct {
14 int (*push)(void *opaque, unsigned char *buf,
15 int len, bool eop);
16 void (*pull)(void *opaque);
17 void (*metadata_push)(void *opaque,
18 const struct dma_context_metadata *md);
19 void *opaque;
20 } client;
23 void *etraxfs_dmac_init(hwaddr base, int nr_channels);
24 void etraxfs_dmac_connect(void *opaque, int channel, qemu_irq *line,
25 int input);
26 void etraxfs_dmac_connect_client(void *opaque, int c,
27 struct etraxfs_dma_client *cl);
28 int etraxfs_dmac_input(struct etraxfs_dma_client *client,
29 void *buf, int len, int eop);