sd: sdhci: check data length during dma_memory_read
[qemu/ar7.git] / include / hw / cris / etraxfs_dma.h
blobf6f33e0980f423476bbb99d5bfeee41a388d2976
1 #ifndef HW_ETRAXFS_DMA_H
2 #define HW_ETRAXFS_DMA_H
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