diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-22 20:53:13 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-22 20:53:13 -0400 |
| commit | 6447f55da90b77faec1697d499ed7986bb4f6de6 (patch) | |
| tree | 2d360d48121bdaa354d1ef19fed48467d08dfb1f /include/linux | |
| parent | c50e3f512a5a15a73acd94e6ec8ed63cd512e04f (diff) | |
| parent | 3ea205c449d2b5996d0256aa8b2894f7aea228a2 (diff) | |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx: (66 commits)
avr32: at32ap700x: fix typo in DMA master configuration
dmaengine/dmatest: Pass timeout via module params
dma: let IMX_DMA depend on IMX_HAVE_DMA_V1 instead of an explicit list of SoCs
fsldma: make halt behave nicely on all supported controllers
fsldma: reduce locking during descriptor cleanup
fsldma: support async_tx dependencies and automatic unmapping
fsldma: fix controller lockups
fsldma: minor codingstyle and consistency fixes
fsldma: improve link descriptor debugging
fsldma: use channel name in printk output
fsldma: move related helper functions near each other
dmatest: fix automatic buffer unmap type
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
...
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/dw_dmac.h | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/include/linux/dw_dmac.h b/include/linux/dw_dmac.h index c8aad713a046..6998d9376ef9 100644 --- a/include/linux/dw_dmac.h +++ b/include/linux/dw_dmac.h | |||
| @@ -16,9 +16,18 @@ | |||
| 16 | /** | 16 | /** |
| 17 | * struct dw_dma_platform_data - Controller configuration parameters | 17 | * struct dw_dma_platform_data - Controller configuration parameters |
| 18 | * @nr_channels: Number of channels supported by hardware (max 8) | 18 | * @nr_channels: Number of channels supported by hardware (max 8) |
| 19 | * @is_private: The device channels should be marked as private and not for | ||
| 20 | * by the general purpose DMA channel allocator. | ||
| 19 | */ | 21 | */ |
| 20 | struct dw_dma_platform_data { | 22 | struct dw_dma_platform_data { |
| 21 | unsigned int nr_channels; | 23 | unsigned int nr_channels; |
| 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; | ||
| 22 | }; | 31 | }; |
| 23 | 32 | ||
| 24 | /** | 33 | /** |
| @@ -33,6 +42,30 @@ enum dw_dma_slave_width { | |||
| 33 | DW_DMA_SLAVE_WIDTH_32BIT, | 42 | DW_DMA_SLAVE_WIDTH_32BIT, |
| 34 | }; | 43 | }; |
| 35 | 44 | ||
| 45 | /* bursts size */ | ||
| 46 | enum 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 */ | ||
| 58 | enum 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 | |||
| 36 | /** | 69 | /** |
| 37 | * struct dw_dma_slave - Controller-specific information about a slave | 70 | * struct dw_dma_slave - Controller-specific information about a slave |
| 38 | * | 71 | * |
| @@ -44,6 +77,11 @@ enum dw_dma_slave_width { | |||
| 44 | * @reg_width: peripheral register width | 77 | * @reg_width: peripheral register width |
| 45 | * @cfg_hi: Platform-specific initializer for the CFG_HI register | 78 | * @cfg_hi: Platform-specific initializer for the CFG_HI register |
| 46 | * @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 | ||
| 47 | */ | 85 | */ |
| 48 | struct dw_dma_slave { | 86 | struct dw_dma_slave { |
| 49 | struct device *dma_dev; | 87 | struct device *dma_dev; |
| @@ -52,6 +90,11 @@ struct dw_dma_slave { | |||
| 52 | enum dw_dma_slave_width reg_width; | 90 | enum dw_dma_slave_width reg_width; |
| 53 | u32 cfg_hi; | 91 | u32 cfg_hi; |
| 54 | u32 cfg_lo; | 92 | u32 cfg_lo; |
| 93 | u8 src_master; | ||
| 94 | u8 dst_master; | ||
| 95 | u8 src_msize; | ||
| 96 | u8 dst_msize; | ||
| 97 | u8 fc; | ||
| 55 | }; | 98 | }; |
| 56 | 99 | ||
| 57 | /* Platform-configurable bits in CFG_HI */ | 100 | /* Platform-configurable bits in CFG_HI */ |
| @@ -62,7 +105,6 @@ struct dw_dma_slave { | |||
| 62 | #define DWC_CFGH_DST_PER(x) ((x) << 11) | 105 | #define DWC_CFGH_DST_PER(x) ((x) << 11) |
| 63 | 106 | ||
| 64 | /* Platform-configurable bits in CFG_LO */ | 107 | /* Platform-configurable bits in CFG_LO */ |
| 65 | #define DWC_CFGL_PRIO(x) ((x) << 5) /* priority */ | ||
| 66 | #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 */ |
| 67 | #define DWC_CFGL_LOCK_CH_BLOCK (1 << 12) | 109 | #define DWC_CFGL_LOCK_CH_BLOCK (1 << 12) |
| 68 | #define DWC_CFGL_LOCK_CH_XACT (2 << 12) | 110 | #define DWC_CFGL_LOCK_CH_XACT (2 << 12) |
