diff options
| author | Peter Crosthwaite | 2013-04-16 02:27:16 +0200 |
|---|---|---|
| committer | Edgar E. Iglesias | 2013-04-16 10:04:23 +0200 |
| commit | 35e60bfdbc14ce31bba55cc82144f8a2a82ede68 (patch) | |
| tree | 2e9d9523edd263fc325a819ad6aba7d78edc4c59 /hw/dma | |
| parent | xilinx_axidma: Fix rx/tx halted bit. (diff) | |
| download | qemu-35e60bfdbc14ce31bba55cc82144f8a2a82ede68.tar.gz qemu-35e60bfdbc14ce31bba55cc82144f8a2a82ede68.tar.xz qemu-35e60bfdbc14ce31bba55cc82144f8a2a82ede68.zip | |
stream: Add flow control API
Add basic flow control to stream. A stream slave may return short, indicating
that it is not capable of accepting any more data at the present time. Polling
or a callback can be used via the can_push() function to determine when the
slave can receive again.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Diffstat (limited to 'hw/dma')
| -rw-r--r-- | hw/dma/xilinx_axidma.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/dma/xilinx_axidma.c b/hw/dma/xilinx_axidma.c index 2bbfea1503..80ce57fca2 100644 --- a/hw/dma/xilinx_axidma.c +++ b/hw/dma/xilinx_axidma.c @@ -381,7 +381,7 @@ static void xilinx_axidma_reset(DeviceState *dev) } } -static void +static size_t xilinx_axidma_data_stream_push(StreamSlave *obj, unsigned char *buf, size_t len, uint32_t *app) { @@ -393,6 +393,7 @@ xilinx_axidma_data_stream_push(StreamSlave *obj, unsigned char *buf, size_t len, } stream_process_s2mem(s, buf, len, app); stream_update_irq(s); + return len; } static uint64_t axidma_read(void *opaque, hwaddr addr, |
