From: kernel@martin.sperl.org (kernel at martin.sperl.org)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V2 4/8] dmaengine: bcm2835: add additional defines for DMA-registers
Date: Thu, 7 Jan 2016 17:33:02 +0000 [thread overview]
Message-ID: <1452187987-2605-5-git-send-email-kernel@martin.sperl.org> (raw)
In-Reply-To: <1452187987-2605-1-git-send-email-kernel@martin.sperl.org>
From: Martin Sperl <kernel@martin.sperl.org>
Add additional defines describing the DMA registers
as well as adding some more documentation to those registers.
Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
---
drivers/dma/bcm2835-dma.c | 54 ++++++++++++++++++++++++++++++++++++++-------
1 file changed, 46 insertions(+), 8 deletions(-)
diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c
index 0c04236..7905327 100644
--- a/drivers/dma/bcm2835-dma.c
+++ b/drivers/dma/bcm2835-dma.c
@@ -99,26 +99,64 @@ struct bcm2835_desc {
#define BCM2835_DMA_CS 0x00
#define BCM2835_DMA_ADDR 0x04
+#define BCM2835_DMA_TI 0x08
#define BCM2835_DMA_SOURCE_AD 0x0c
#define BCM2835_DMA_DEST_AD 0x10
-#define BCM2835_DMA_NEXTCB 0x1C
+#define BCM2835_DMA_LEN 0x14
+#define BCM2835_DMA_STIDE 0x18
+#define BCM2835_DMA_NEXTCB 0x1c
+#define BCM2835_DMA_DEBUG 0x20
/* DMA CS Control and Status bits */
-#define BCM2835_DMA_ACTIVE BIT(0)
-#define BCM2835_DMA_INT BIT(2)
+#define BCM2835_DMA_ACTIVE BIT(0) /* activate the DMA */
+#define BCM2835_DMA_END BIT(1) /* current CB has ended */
+#define BCM2835_DMA_INT BIT(2) /* interrupt status */
+#define BCM2835_DMA_DREQ BIT(3) /* DREQ state */
#define BCM2835_DMA_ISPAUSED BIT(4) /* Pause requested or not active */
#define BCM2835_DMA_ISHELD BIT(5) /* Is held by DREQ flow control */
-#define BCM2835_DMA_ERR BIT(8)
+#define BCM2835_DMA_WAITING_FOR_WRITES BIT(6) /* waiting for last
+ * AXI-write to ack
+ */
+#define BCM2835_DMA_ERR BIT(8)
+#define BCM2835_DMA_PRIORITY(x) ((x & 15) << 16) /* AXI priority */
+#define BCM2835_DMA_PANIC_PRIORITY(x) ((x & 15) << 20) /* panic priority */
+#define BCM2835_DMA_WAIT_FOR_WRITES BIT(28) /* current value of
+ * TI.BCM2835_DMA_WAIT_RESP
+ */
+#define BCM2835_DMA_DIS_DEBUG BIT(29) /* disable debug pause signal */
#define BCM2835_DMA_ABORT BIT(30) /* Stop current CB, go to next, WO */
#define BCM2835_DMA_RESET BIT(31) /* WO, self clearing */
+/* Transfer information bits - also bcm2835_cb.info field */
#define BCM2835_DMA_INT_EN BIT(0)
+#define BCM2835_DMA_TDMODE BIT(1) /* 2D-Mode */
+#define BCM2835_DMA_WAIT_RESP BIT(3) /* wait for AXI-write to be acked */
#define BCM2835_DMA_D_INC BIT(4)
-#define BCM2835_DMA_D_DREQ BIT(6)
+#define BCM2835_DMA_D_WIDTH BIT(5) /* 128bit writes if set */
+#define BCM2835_DMA_D_DREQ BIT(6) /* enable DREQ for destination */
+#define BCM2835_DMA_D_IGNORE BIT(7) /* ignore destination writes */
#define BCM2835_DMA_S_INC BIT(8)
-#define BCM2835_DMA_S_DREQ BIT(10)
-
-#define BCM2835_DMA_PER_MAP(x) ((x) << 16)
+#define BCM2835_DMA_S_WIDTH BIT(9) /* 128bit writes if set */
+#define BCM2835_DMA_S_DREQ BIT(10) /* enable SREQ for source */
+#define BCM2835_DMA_S_IGNORE BIT(11) /* ignore source reads - read 0 */
+#define BCM2835_DMA_BURST_LENGTH(x) ((x & 15) << 12)
+#define BCM2835_DMA_PER_MAP(x) ((x & 31) << 16) /* REQ source */
+#define BCM2835_DMA_WAIT(x) ((x & 31) << 21) /* add DMA-wait cycles */
+#define BCM2835_DMA_NO_WIDE_BURSTS BIT(26) /* no 2 beat write bursts */
+
+/* debug register bits */
+#define BCM2835_DMA_DEBUG_LAST_NOT_SET_ERR BIT(0)
+#define BCM2835_DMA_DEBUG_FIFO_ERR BIT(1)
+#define BCM2835_DMA_DEBUG_READ_ERR BIT(2)
+#define BCM2835_DMA_DEBUG_OUTSTANDING_WRITES_SHIFT 4
+#define BCM2835_DMA_DEBUG_OUTSTANDING_WRITES_BITS 4
+#define BCM2835_DMA_DEBUG_ID_SHIFT 16
+#define BCM2835_DMA_DEBUG_ID_BITS 9
+#define BCM2835_DMA_DEBUG_STATE_SHIFT 16
+#define BCM2835_DMA_DEBUG_STATE_BITS 9
+#define BCM2835_DMA_DEBUG_VERSION_SHIFT 25
+#define BCM2835_DMA_DEBUG_VERSION_BITS 3
+#define BCM2835_DMA_DEBUG_LITE BIT(28)
#define BCM2835_DMA_DATA_TYPE_S8 1
#define BCM2835_DMA_DATA_TYPE_S16 2
--
1.7.10.4
next prev parent reply other threads:[~2016-01-07 17:33 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-07 17:32 [PATCH V2 0/8] dmaengine: bcm2835: enhancement of driver kernel at martin.sperl.org
2016-01-07 17:32 ` [PATCH V2 1/8] dmaengine: bcm2835: set residue_granularity field kernel at martin.sperl.org
2016-01-28 19:53 ` Eric Anholt
2016-01-07 17:33 ` [PATCH V2 2/8] dmaengine: bcm2835: remove unnecessary masking of dma channels kernel at martin.sperl.org
2016-01-30 3:08 ` Eric Anholt
2016-01-07 17:33 ` [PATCH V2 3/8] dmaengine: bcm2835: use shared interrupt for channel 11 to 14 kernel at martin.sperl.org
2016-01-13 12:26 ` Vinod Koul
2016-01-13 13:30 ` Martin Sperl
2016-01-13 13:43 ` Vinod Koul
2016-01-13 14:24 ` Martin Sperl
2016-01-14 4:07 ` Vinod Koul
2016-01-14 8:48 ` Martin Sperl
2016-02-29 17:10 ` Martin Sperl
2016-03-03 15:45 ` Vinod Koul
2016-02-18 4:09 ` Eric Anholt
2016-01-07 17:33 ` kernel at martin.sperl.org [this message]
2016-01-13 12:32 ` [PATCH V2 4/8] dmaengine: bcm2835: add additional defines for DMA-registers Vinod Koul
2016-02-18 4:18 ` Eric Anholt
2016-01-07 17:33 ` [PATCH V2 5/8] dmaengine: bcm2835: move cyclic member from bcm2835_chan into bcm2835_desc kernel at martin.sperl.org
2016-02-18 4:19 ` Eric Anholt
2016-01-07 17:33 ` [PATCH V2 6/8] dmaengine: bcm2835: move controlblock chain generation into separate method kernel at martin.sperl.org
2016-01-13 13:23 ` Vinod Koul
2016-01-13 13:38 ` Martin Sperl
2016-02-18 3:24 ` Eric Anholt
2016-02-29 18:14 ` Martin Sperl
2016-01-07 17:33 ` [PATCH V2 7/8] dmaengine: bcm2835: add slave_sg support to bcm2835-dma kernel at martin.sperl.org
2016-02-18 4:39 ` Eric Anholt
2016-01-07 17:33 ` [PATCH V2 8/8] dmaengine: bcm2835: add dma_memcopy " kernel at martin.sperl.org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1452187987-2605-5-git-send-email-kernel@martin.sperl.org \
--to=kernel@martin.sperl.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).