aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/dw_dmac.h
diff options
context:
space:
mode:
authorViresh KUMAR <viresh.kumar@st.com>2011-03-04 05:12:51 -0500
committerVinod Koul <vinod.koul@intel.com>2011-03-06 14:42:28 -0500
commitee66509d7f354eecb45ac99f21ea6aa8650dea7e (patch)
tree206438e7c0ef9a7f0633fe44d6f306fdbf4b0b4e /include/linux/dw_dmac.h
parent59c22fc11d12b69da36c6585a38229863ba0bb16 (diff)
dw_dmac: Allow src/dst msize & flow controller to be configured at runtime
Msize or Burst Size is peripheral dependent in case of prep_slave_sg and cyclic_prep transfers, and in case of memcpy transfers it is platform dependent. So msize configuration must come from platform data. Also some peripherals (ex: JPEG), need to be flow controller for dma transfers, so this information in case of slave_sg & cyclic_prep transfers must come from platform data. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'include/linux/dw_dmac.h')
-rw-r--r--include/linux/dw_dmac.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/include/linux/dw_dmac.h b/include/linux/dw_dmac.h
index 3ba2f066ff46..6998d9376ef9 100644
--- a/include/linux/dw_dmac.h
+++ b/include/linux/dw_dmac.h
@@ -42,6 +42,30 @@ enum dw_dma_slave_width {
42 DW_DMA_SLAVE_WIDTH_32BIT, 42 DW_DMA_SLAVE_WIDTH_32BIT,
43}; 43};
44 44
45/* bursts size */
46enum dw_dma_msize {
47 DW_DMA_MSIZE_1,
48 DW_DMA_MSIZE_4,
49 DW_DMA_MSIZE_8,
50 DW_DMA_MSIZE_16,
51 DW_DMA_MSIZE_32,
52 DW_DMA_MSIZE_64,
53 DW_DMA_MSIZE_128,
54 DW_DMA_MSIZE_256,
55};
56
57/* flow controller */
58enum dw_dma_fc {
59 DW_DMA_FC_D_M2M,
60 DW_DMA_FC_D_M2P,
61 DW_DMA_FC_D_P2M,
62 DW_DMA_FC_D_P2P,
63 DW_DMA_FC_P_P2M,
64 DW_DMA_FC_SP_P2P,
65 DW_DMA_FC_P_M2P,
66 DW_DMA_FC_DP_P2P,
67};
68
45/** 69/**
46 * struct dw_dma_slave - Controller-specific information about a slave 70 * struct dw_dma_slave - Controller-specific information about a slave
47 * 71 *
@@ -55,6 +79,9 @@ enum dw_dma_slave_width {
55 * @cfg_lo: Platform-specific initializer for the CFG_LO register 79 * @cfg_lo: Platform-specific initializer for the CFG_LO register
56 * @src_master: src master for transfers on allocated channel. 80 * @src_master: src master for transfers on allocated channel.
57 * @dst_master: dest master for transfers on allocated channel. 81 * @dst_master: dest master for transfers on allocated channel.
82 * @src_msize: src burst size.
83 * @dst_msize: dest burst size.
84 * @fc: flow controller for DMA transfer
58 */ 85 */
59struct dw_dma_slave { 86struct dw_dma_slave {
60 struct device *dma_dev; 87 struct device *dma_dev;
@@ -65,6 +92,9 @@ struct dw_dma_slave {
65 u32 cfg_lo; 92 u32 cfg_lo;
66 u8 src_master; 93 u8 src_master;
67 u8 dst_master; 94 u8 dst_master;
95 u8 src_msize;
96 u8 dst_msize;
97 u8 fc;
68}; 98};
69 99
70/* Platform-configurable bits in CFG_HI */ 100/* Platform-configurable bits in CFG_HI */