qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v1 1/1] xilinx_axidma.c: Fix up the stream_running()


From: Alistair Francis
Subject: [Qemu-devel] [PATCH v1 1/1] xilinx_axidma.c: Fix up the stream_running() function
Date: Wed, 27 May 2015 17:37:26 +1000

Previously the stream_running() function didn't check
if the DMA was halted. This caused hangs in recent versions
of MicroBlaze u-boot. Correct stream_running() to check
DMASR_HALTED as well as DMACR_RUNSTOP.

Signed-off-by: Alistair Francis <address@hidden>
Reviewed-by: Sai Pavan Boddu <address@hidden>
---
 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 d06002d..27fba40 100644
--- a/hw/dma/xilinx_axidma.c
+++ b/hw/dma/xilinx_axidma.c
@@ -154,7 +154,8 @@ static inline int stream_resetting(struct Stream *s)
 
 static inline int stream_running(struct Stream *s)
 {
-    return s->regs[R_DMACR] & DMACR_RUNSTOP;
+    return s->regs[R_DMACR] & DMACR_RUNSTOP &&
+           !(s->regs[R_DMASR] & DMASR_HALTED);
 }
 
 static inline int stream_idle(struct Stream *s)
-- 
1.7.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]