Module Name: src
Committed By: jmcneill
Date: Sun Aug 2 16:46:12 UTC 2015
Modified Files:
src/sys/arch/arm/broadcom: bcm2835_dmac.c
Log Message:
When halting a channel, abort the current DMA CB and reset the channel
before stopping DMA.
To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/broadcom/bcm2835_dmac.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/arm/broadcom/bcm2835_dmac.c
diff -u src/sys/arch/arm/broadcom/bcm2835_dmac.c:1.11 src/sys/arch/arm/broadcom/bcm2835_dmac.c:1.12
--- src/sys/arch/arm/broadcom/bcm2835_dmac.c:1.11 Wed Jul 29 14:22:49 2015
+++ src/sys/arch/arm/broadcom/bcm2835_dmac.c Sun Aug 2 16:46:12 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: bcm2835_dmac.c,v 1.11 2015/07/29 14:22:49 skrll Exp $ */
+/* $NetBSD: bcm2835_dmac.c,v 1.12 2015/08/02 16:46:12 jmcneill Exp $ */
/*-
* Copyright (c) 2014 Jared D. McNeill <[email protected]>
@@ -29,7 +29,7 @@
#include "opt_ddb.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_dmac.c,v 1.11 2015/07/29 14:22:49 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_dmac.c,v 1.12 2015/08/02 16:46:12 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -275,6 +275,9 @@ bcm_dmac_transfer(struct bcm_dmac_channe
void
bcm_dmac_halt(struct bcm_dmac_channel *ch)
{
+ struct bcm_dmac_softc *sc = ch->ch_sc;
+
+ DMAC_WRITE(sc, DMAC_CS(ch->ch_index), DMAC_CS_RESET|DMAC_CS_ABORT);
bcm_dmac_set_conblk_addr(ch, 0);
}