From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45186) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z02g2-0006oe-W3 for qemu-devel@nongnu.org; Wed, 03 Jun 2015 03:01:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z02fx-0000LR-CI for qemu-devel@nongnu.org; Wed, 03 Jun 2015 03:01:26 -0400 MIME-Version: 1.0 Sender: alistair23@gmail.com In-Reply-To: <14e62e727b01a64c188921b7ef2862f0f92734e4.1432711923.git.alistair.francis@xilinx.com> References: <14e62e727b01a64c188921b7ef2862f0f92734e4.1432711923.git.alistair.francis@xilinx.com> From: Alistair Francis Date: Wed, 3 Jun 2015 17:00:50 +1000 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH v1 1/1] xilinx_axidma.c: Fix up the stream_running() function List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alistair Francis , qemu-trivial@nongnu.org Cc: Edgar Iglesias , saipava@xilinx.com, Peter Crosthwaite , "qemu-devel@nongnu.org Developers" On Wed, May 27, 2015 at 5:37 PM, Alistair Francis wrote: > 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 > Reviewed-by: Sai Pavan Boddu Ping! Also add QEMU Trivial. Thanks, Alistair > --- > 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 >