Skip to content

Commit 7a9c7f4

Browse files
Jan Kuligavinodkoul
authored andcommitted
dmaengine: xilinx: xdma: Add necessary macro definitions
Complete lacking bits describing the status/control register values. Add macros describing the status/control registers. Signed-off-by: Jan Kuliga <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 6e23871 commit 7a9c7f4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

drivers/dma/xilinx/xdma-regs.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ struct xdma_hw_desc {
7676
#define XDMA_CHAN_CONTROL_W1S 0x8
7777
#define XDMA_CHAN_CONTROL_W1C 0xc
7878
#define XDMA_CHAN_STATUS 0x40
79+
#define XDMA_CHAN_STATUS_RC 0x44
7980
#define XDMA_CHAN_COMPLETED_DESC 0x48
8081
#define XDMA_CHAN_ALIGNMENTS 0x4c
8182
#define XDMA_CHAN_INTR_ENABLE 0x90
@@ -101,6 +102,7 @@ struct xdma_hw_desc {
101102
#define CHAN_CTRL_IE_MAGIC_STOPPED BIT(4)
102103
#define CHAN_CTRL_IE_IDLE_STOPPED BIT(6)
103104
#define CHAN_CTRL_IE_READ_ERROR GENMASK(13, 9)
105+
#define CHAN_CTRL_IE_WRITE_ERROR GENMASK(18, 14)
104106
#define CHAN_CTRL_IE_DESC_ERROR GENMASK(23, 19)
105107
#define CHAN_CTRL_NON_INCR_ADDR BIT(25)
106108
#define CHAN_CTRL_POLL_MODE_WB BIT(26)
@@ -111,8 +113,17 @@ struct xdma_hw_desc {
111113
CHAN_CTRL_IE_DESC_ALIGN_MISMATCH | \
112114
CHAN_CTRL_IE_MAGIC_STOPPED | \
113115
CHAN_CTRL_IE_READ_ERROR | \
116+
CHAN_CTRL_IE_WRITE_ERROR | \
114117
CHAN_CTRL_IE_DESC_ERROR)
115118

119+
#define XDMA_CHAN_STATUS_MASK CHAN_CTRL_START
120+
121+
#define XDMA_CHAN_ERROR_MASK (CHAN_CTRL_IE_DESC_ALIGN_MISMATCH | \
122+
CHAN_CTRL_IE_MAGIC_STOPPED | \
123+
CHAN_CTRL_IE_READ_ERROR | \
124+
CHAN_CTRL_IE_WRITE_ERROR | \
125+
CHAN_CTRL_IE_DESC_ERROR)
126+
116127
/* bits of the channel interrupt enable mask */
117128
#define CHAN_IM_DESC_ERROR BIT(19)
118129
#define CHAN_IM_READ_ERROR BIT(9)

0 commit comments

Comments
 (0)