Go to the documentation of this file.
14 #ifndef __DMA_FSLDMA_H
15 #define __DMA_FSLDMA_H
17 #include <linux/device.h>
24 #define FSL_DMA_MR_CS 0x00000001
25 #define FSL_DMA_MR_CC 0x00000002
26 #define FSL_DMA_MR_CA 0x00000008
27 #define FSL_DMA_MR_EIE 0x00000040
28 #define FSL_DMA_MR_XFE 0x00000020
29 #define FSL_DMA_MR_EOLNIE 0x00000100
30 #define FSL_DMA_MR_EOLSIE 0x00000080
31 #define FSL_DMA_MR_EOSIE 0x00000200
32 #define FSL_DMA_MR_CDSM 0x00000010
33 #define FSL_DMA_MR_CTM 0x00000004
34 #define FSL_DMA_MR_EMP_EN 0x00200000
35 #define FSL_DMA_MR_EMS_EN 0x00040000
36 #define FSL_DMA_MR_DAHE 0x00002000
37 #define FSL_DMA_MR_SAHE 0x00001000
44 #define FSL_DMA_MR_BWC 0x08000000
47 #define FSL_DMA_MR_EOTIE 0x00000080
48 #define FSL_DMA_MR_PRC_RM 0x00000800
50 #define FSL_DMA_SR_CH 0x00000020
51 #define FSL_DMA_SR_PE 0x00000010
52 #define FSL_DMA_SR_CB 0x00000004
53 #define FSL_DMA_SR_TE 0x00000080
54 #define FSL_DMA_SR_EOSI 0x00000002
55 #define FSL_DMA_SR_EOLSI 0x00000001
56 #define FSL_DMA_SR_EOCDI 0x00000001
57 #define FSL_DMA_SR_EOLNI 0x00000008
59 #define FSL_DMA_SATR_SBPATMU 0x20000000
60 #define FSL_DMA_SATR_STRANSINT_RIO 0x00c00000
61 #define FSL_DMA_SATR_SREADTYPE_SNOOP_READ 0x00050000
62 #define FSL_DMA_SATR_SREADTYPE_BP_IORH 0x00020000
63 #define FSL_DMA_SATR_SREADTYPE_BP_NREAD 0x00040000
64 #define FSL_DMA_SATR_SREADTYPE_BP_MREAD 0x00070000
66 #define FSL_DMA_DATR_DBPATMU 0x20000000
67 #define FSL_DMA_DATR_DTRANSINT_RIO 0x00c00000
68 #define FSL_DMA_DATR_DWRITETYPE_SNOOP_WRITE 0x00050000
69 #define FSL_DMA_DATR_DWRITETYPE_BP_FLUSH 0x00010000
71 #define FSL_DMA_EOL ((u64)0x1)
72 #define FSL_DMA_SNEN ((u64)0x10)
73 #define FSL_DMA_EOSIE 0x8
74 #define FSL_DMA_NLDA_MASK (~(u64)0x1f)
76 #define FSL_DMA_BCR_MAX_CNT 0x03ffffffu
78 #define FSL_DMA_DGSR_TE 0x80
79 #define FSL_DMA_DGSR_CH 0x20
80 #define FSL_DMA_DGSR_PE 0x10
81 #define FSL_DMA_DGSR_EOLNI 0x08
82 #define FSL_DMA_DGSR_CB 0x04
83 #define FSL_DMA_DGSR_EOSI 0x02
84 #define FSL_DMA_DGSR_EOLSI 0x01
115 #define FSL_DMA_MAX_CHANS_PER_DEVICE 4
127 #define FSL_DMA_LITTLE_ENDIAN 0x00000000
128 #define FSL_DMA_BIG_ENDIAN 0x00000001
130 #define FSL_DMA_IP_MASK 0x00000ff0
131 #define FSL_DMA_IP_85XX 0x00000010
132 #define FSL_DMA_IP_83XX 0x00000020
134 #define FSL_DMA_CHAN_PAUSE_EXT 0x00001000
135 #define FSL_DMA_CHAN_START_EXT 0x00002000
159 #define to_fsl_chan(chan) container_of(chan, struct fsldma_chan, common)
160 #define to_fsl_desc(lh) container_of(lh, struct fsl_desc_sw, node)
161 #define tx_to_fsl_desc(tx) container_of(tx, struct fsl_desc_sw, async_tx)
163 #ifndef __powerpc64__
190 #define DMA_IN(fsl_chan, addr, width) \
191 (((fsl_chan)->feature & FSL_DMA_BIG_ENDIAN) ? \
192 in_be##width(addr) : in_le##width(addr))
193 #define DMA_OUT(fsl_chan, addr, val, width) \
194 (((fsl_chan)->feature & FSL_DMA_BIG_ENDIAN) ? \
195 out_be##width(addr, val) : out_le##width(addr, val))
197 #define DMA_TO_CPU(fsl_chan, d, width) \
198 (((fsl_chan)->feature & FSL_DMA_BIG_ENDIAN) ? \
199 be##width##_to_cpu((__force __be##width)(v##width)d) : \
200 le##width##_to_cpu((__force __le##width)(v##width)d))
201 #define CPU_TO_DMA(fsl_chan, c, width) \
202 (((fsl_chan)->feature & FSL_DMA_BIG_ENDIAN) ? \
203 (__force v##width)cpu_to_be##width(c) : \
204 (__force v##width)cpu_to_le##width(c))