qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v1 1/1] xilinx_axidma.c: Fix up the stream_running() function
@ 2015-05-27  7:37 Alistair Francis
  2015-06-03  7:00 ` Alistair Francis
  2015-06-03 22:52 ` Peter Crosthwaite
  0 siblings, 2 replies; 7+ messages in thread
From: Alistair Francis @ 2015-05-27  7:37 UTC (permalink / raw)
  To: qemu-devel; +Cc: edgar.iglesias, saipava, peter.crosthwaite, alistair.francis

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 <alistair.francis@xilinx.com>
Reviewed-by: Sai Pavan Boddu <saipava@xilinx.com>
---
 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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-06-19  0:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-27  7:37 [Qemu-devel] [PATCH v1 1/1] xilinx_axidma.c: Fix up the stream_running() function Alistair Francis
2015-06-03  7:00 ` Alistair Francis
2015-06-04 10:20   ` Michael Tokarev
2015-06-03 22:52 ` Peter Crosthwaite
2015-06-05  2:00   ` Alistair Francis
2015-06-05  2:58     ` Peter Crosthwaite
2015-06-19  0:04       ` Alistair Francis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).