aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-03-11 17:56:58 -0500
committerDan Williams <dan.j.williams@intel.com>2011-03-11 17:56:58 -0500
commit6c11371dd17c5bd29e3a53cf5263be6ea67c51e4 (patch)
tree012aaba103ad8f685cd1b6bb882472b56818b446 /include/linux
parentf5539af572ffa35545f21f604fb747eae55c8042 (diff)
parent0b863b333f529c7ddd8bee58e6696a7254417a05 (diff)
Merge branch 'for_dan' of git://git.infradead.org/users/vkoul/slave-dma into dmaengine
* 'for_dan' of git://git.infradead.org/users/vkoul/slave-dma: drivers, pch_dma: Fix warning when CONFIG_PM=n. dmaengine/dw_dmac fix: use readl & writel instead of __raw_readl & __raw_writel avr32: at32ap700x: Specify DMA Flow Controller, Src and Dst msize dw_dmac: Setting Default Burst length for transfers as 16. dw_dmac: Allow src/dst msize & flow controller to be configured at runtime dw_dmac: Changing type of src_master and dest_master to u8. dw_dmac: Pass Channel Priority from platform_data dw_dmac: Pass Channel Allocation Order from platform_data dw_dmac: Mark all tx_descriptors with DMA_CRTL_ACK after xfer finish dw_dmac: Change value of DWC_MAX_COUNT to 4095. dw_dmac: Adding support for 64 bit access width for memcpy xfers dw_dmac: Calling dwc_scan_descriptors from dwc_tx_status() after taking lock dw_dmac: Move single descriptor from dwc->queue to dwc->active_list in dwc_complete_all dw_dmac: Replace module_init() with subsys_initcall() dw_dmac: Remove compilation dependency from AVR32 and put on HAVE_CLK dmaengine: mxs-dma: add dma support for i.MX23/28 pch_dma: set the number of array correctly pch_dma: fix kernel error issue
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/dw_dmac.h43
1 files changed, 40 insertions, 3 deletions
diff --git a/include/linux/dw_dmac.h b/include/linux/dw_dmac.h
index deec66b37180..6998d9376ef9 100644
--- a/include/linux/dw_dmac.h
+++ b/include/linux/dw_dmac.h
@@ -22,6 +22,12 @@
22struct dw_dma_platform_data { 22struct dw_dma_platform_data {
23 unsigned int nr_channels; 23 unsigned int nr_channels;
24 bool is_private; 24 bool is_private;
25#define CHAN_ALLOCATION_ASCENDING 0 /* zero to seven */
26#define CHAN_ALLOCATION_DESCENDING 1 /* seven to zero */
27 unsigned char chan_allocation_order;
28#define CHAN_PRIORITY_ASCENDING 0 /* chan0 highest */
29#define CHAN_PRIORITY_DESCENDING 1 /* chan7 highest */
30 unsigned char chan_priority;
25}; 31};
26 32
27/** 33/**
@@ -36,6 +42,30 @@ enum dw_dma_slave_width {
36 DW_DMA_SLAVE_WIDTH_32BIT, 42 DW_DMA_SLAVE_WIDTH_32BIT,
37}; 43};
38 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
39/** 69/**
40 * struct dw_dma_slave - Controller-specific information about a slave 70 * struct dw_dma_slave - Controller-specific information about a slave
41 * 71 *
@@ -47,6 +77,11 @@ enum dw_dma_slave_width {
47 * @reg_width: peripheral register width 77 * @reg_width: peripheral register width
48 * @cfg_hi: Platform-specific initializer for the CFG_HI register 78 * @cfg_hi: Platform-specific initializer for the CFG_HI register
49 * @cfg_lo: Platform-specific initializer for the CFG_LO register 79 * @cfg_lo: Platform-specific initializer for the CFG_LO register
80 * @src_master: src 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
50 */ 85 */
51struct dw_dma_slave { 86struct dw_dma_slave {
52 struct device *dma_dev; 87 struct device *dma_dev;
@@ -55,8 +90,11 @@ struct dw_dma_slave {
55 enum dw_dma_slave_width reg_width; 90 enum dw_dma_slave_width reg_width;
56 u32 cfg_hi; 91 u32 cfg_hi;
57 u32 cfg_lo; 92 u32 cfg_lo;
58 int src_master; 93 u8 src_master;
59 int dst_master; 94 u8 dst_master;
95 u8 src_msize;
96 u8 dst_msize;
97 u8 fc;
60}; 98};
61 99
62/* Platform-configurable bits in CFG_HI */ 100/* Platform-configurable bits in CFG_HI */
@@ -67,7 +105,6 @@ struct dw_dma_slave {
67#define DWC_CFGH_DST_PER(x) ((x) << 11) 105#define DWC_CFGH_DST_PER(x) ((x) << 11)
68 106
69/* Platform-configurable bits in CFG_LO */ 107/* Platform-configurable bits in CFG_LO */
70#define DWC_CFGL_PRIO(x) ((x) << 5) /* priority */
71#define DWC_CFGL_LOCK_CH_XFER (0 << 12) /* scope of LOCK_CH */ 108#define DWC_CFGL_LOCK_CH_XFER (0 << 12) /* scope of LOCK_CH */
72#define DWC_CFGL_LOCK_CH_BLOCK (1 << 12) 109#define DWC_CFGL_LOCK_CH_BLOCK (1 << 12)
73#define DWC_CFGL_LOCK_CH_XACT (2 << 12) 110#define DWC_CFGL_LOCK_CH_XACT (2 << 12)