aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/dw_dmac_regs.h
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2013-01-25 04:48:03 -0500
committerVinod Koul <vinod.koul@intel.com>2013-01-28 07:04:50 -0500
commit4702d5244ca947263e8b7eb2ba6d8721e80c46e2 (patch)
tree127c5fdd5590467d781aca04685517e97d02bb01 /drivers/dma/dw_dmac_regs.h
parent176dcec50f3f0bc46f11b983c1a3bbc2dd3514fd (diff)
dw_dmac: return proper residue value
Currently the driver returns full length of the active descriptor which is wrong. We have to go throught the active descriptor and substract the length of each sent children in the chain from the total length along with the actual data in the DMA channel registers. The cyclic case is not handled by this patch due to len field in the descriptor structure is left untouched by the original code. 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@intel.com>
Diffstat (limited to 'drivers/dma/dw_dmac_regs.h')
-rw-r--r--drivers/dma/dw_dmac_regs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/dma/dw_dmac_regs.h b/drivers/dma/dw_dmac_regs.h
index 833b4cf9843d..88dd8eb31957 100644
--- a/drivers/dma/dw_dmac_regs.h
+++ b/drivers/dma/dw_dmac_regs.h
@@ -203,6 +203,7 @@ struct dw_dma_chan {
203 struct list_head active_list; 203 struct list_head active_list;
204 struct list_head queue; 204 struct list_head queue;
205 struct list_head free_list; 205 struct list_head free_list;
206 u32 residue;
206 struct dw_cyclic_desc *cdesc; 207 struct dw_cyclic_desc *cdesc;
207 208
208 unsigned int descs_allocated; 209 unsigned int descs_allocated;