]> git.proxmox.com Git - qemu.git/blame - hw/etraxfs_dma.h
build: enable using $(CONFIG_FOO) on the rhs of config files
[qemu.git] / hw / etraxfs_dma.h
CommitLineData
cb9c377f
PB
1#ifndef HW_ETRAXFS_DMA_H
2#define HW_ETRAXFS_DMA_H 1
3
73a511de
LP
4struct dma_context_metadata {
5 /* data descriptor md */
6 uint16_t metadata;
7};
8
1ba13a5d
EI
9struct etraxfs_dma_client
10{
11 /* DMA controller. */
12 int channel;
13 void *ctrl;
14
15 /* client. */
73a511de
LP
16 struct {
17 int (*push)(void *opaque, unsigned char *buf,
18 int len, bool eop);
1ba13a5d 19 void (*pull)(void *opaque);
73a511de
LP
20 void (*metadata_push)(void *opaque,
21 const struct dma_context_metadata *md);
1ba13a5d
EI
22 void *opaque;
23 } client;
24};
25
a8170e5e 26void *etraxfs_dmac_init(hwaddr base, int nr_channels);
1ba13a5d
EI
27void etraxfs_dmac_connect(void *opaque, int channel, qemu_irq *line,
28 int input);
29void etraxfs_dmac_connect_client(void *opaque, int c,
30 struct etraxfs_dma_client *cl);
1ba13a5d
EI
31int etraxfs_dmac_input(struct etraxfs_dma_client *client,
32 void *buf, int len, int eop);
cb9c377f
PB
33
34#endif