dw_dmac: fill individual length of descriptor
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 25 Jan 2013 09:48:02 +0000 (11:48 +0200)
committerVinod Koul <vinod.koul@intel.com>
Mon, 28 Jan 2013 12:04:42 +0000 (04:04 -0800)
It will be useful to have the length of the transfer in the descriptor. The
cyclic transfer functions remained untouched.

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>
drivers/dma/dw_dmac.c

index 7f9f3324de1727a12b3c238788cb1599f91a8d73..5816da34129d70e6da0f69d4b5e7ed913fa25c89 100644 (file)
@@ -757,6 +757,7 @@ dwc_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
                desc->lli.dar = dest + offset;
                desc->lli.ctllo = ctllo;
                desc->lli.ctlhi = xfer_count;
+               desc->len = xfer_count << src_width;
 
                if (!first) {
                        first = desc;
@@ -855,6 +856,7 @@ slave_sg_todev_fill_desc:
                        }
 
                        desc->lli.ctlhi = dlen >> mem_width;
+                       desc->len = dlen;
 
                        if (!first) {
                                first = desc;
@@ -913,6 +915,7 @@ slave_sg_fromdev_fill_desc:
                                len = 0;
                        }
                        desc->lli.ctlhi = dlen >> reg_width;
+                       desc->len = dlen;
 
                        if (!first) {
                                first = desc;