aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/dw_dmac_regs.h
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2012-09-21 08:05:49 -0400
committerVinod Koul <vinod.koul@linux.intel.com>2012-09-27 06:05:23 -0400
commitfed2574b3c9f44556ed4f5cb17f63b15edd87d06 (patch)
tree1b080d85ea7e32778dae4d0dfce9d961bd5efee0 /drivers/dma/dw_dmac_regs.h
parenta09820043c9e11149145a1ec221eed4a7b42dcce (diff)
dw_dmac: introduce software emulation of LLP transfers
Some controllers have the reduced functionality where the LLP multi block transfers are not supported. This patch introduces a support of such controllers. In case of memory copy or scatter-gather lists it emulates LLP transfers via bunch of the regular single block ones. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Diffstat (limited to 'drivers/dma/dw_dmac_regs.h')
-rw-r--r--drivers/dma/dw_dmac_regs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/dma/dw_dmac_regs.h b/drivers/dma/dw_dmac_regs.h
index 06f03914f022..ff39fa6cd2bc 100644
--- a/drivers/dma/dw_dmac_regs.h
+++ b/drivers/dma/dw_dmac_regs.h
@@ -172,6 +172,7 @@ struct dw_dma_regs {
172 172
173enum dw_dmac_flags { 173enum dw_dmac_flags {
174 DW_DMA_IS_CYCLIC = 0, 174 DW_DMA_IS_CYCLIC = 0,
175 DW_DMA_IS_SOFT_LLP = 1,
175}; 176};
176 177
177struct dw_dma_chan { 178struct dw_dma_chan {
@@ -182,6 +183,10 @@ struct dw_dma_chan {
182 bool paused; 183 bool paused;
183 bool initialized; 184 bool initialized;
184 185
186 /* software emulation of the LLP transfers */
187 struct list_head *tx_list;
188 struct list_head *tx_node_active;
189
185 spinlock_t lock; 190 spinlock_t lock;
186 191
187 /* these other elements are all protected by lock */ 192 /* these other elements are all protected by lock */
@@ -195,6 +200,7 @@ struct dw_dma_chan {
195 200
196 /* hardware configuration */ 201 /* hardware configuration */
197 unsigned int block_size; 202 unsigned int block_size;
203 bool nollp;
198 204
199 /* configuration passed via DMA_SLAVE_CONFIG */ 205 /* configuration passed via DMA_SLAVE_CONFIG */
200 struct dma_slave_config dma_sconfig; 206 struct dma_slave_config dma_sconfig;