mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Viresh Kumar <viresh.linux@gmail.com>,
	Vinod Koul <vinod.koul@intel.com>,
	linux-kernel@vger.kernel.org,
	spear-devel <spear-devel@list.st.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v2 3/4] dw_dmac: fill individual length of descriptor
Date: Wed, 23 Jan 2013 17:37:31 +0200	[thread overview]
Message-ID: <1358955452-20960-4-git-send-email-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <1358955452-20960-1-git-send-email-andriy.shevchenko@linux.intel.com>

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>
---
 drivers/dma/dw_dmac.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index c3062a5..026a3c7 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -756,6 +756,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;
@@ -852,8 +853,8 @@ slave_sg_todev_fill_desc:
 				dlen = len;
 				len = 0;
 			}
-
 			desc->lli.ctlhi = dlen >> mem_width;
+			desc->len = dlen;
 
 			if (!first) {
 				first = desc;
@@ -912,6 +913,7 @@ slave_sg_fromdev_fill_desc:
 				len = 0;
 			}
 			desc->lli.ctlhi = dlen >> reg_width;
+			desc->len = dlen;
 
 			if (!first) {
 				first = desc;
-- 
1.7.10.4


  parent reply	other threads:[~2013-01-23 15:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-23 15:37 [PATCH v2 0/4] dw_dmac: return proper residue value Andy Shevchenko
2013-01-23 15:37 ` [PATCH v2 1/4] dw_dmac: remove unnecessary tx_list field in dw_dma_chan Andy Shevchenko
2013-01-24  4:37   ` Viresh Kumar
2013-01-23 15:37 ` [PATCH v2 2/4] dw_dmac: introduce total_len field in struct dw_desc Andy Shevchenko
2013-01-24  4:39   ` Viresh Kumar
2013-01-23 15:37 ` Andy Shevchenko [this message]
2013-01-24  4:40   ` [PATCH v2 3/4] dw_dmac: fill individual length of descriptor Viresh Kumar
2013-01-23 15:37 ` [PATCH v2 4/4] dw_dmac: return proper residue value Andy Shevchenko
2013-01-24  5:07   ` Viresh Kumar
2013-01-24  8:01     ` Andy Shevchenko
2013-01-24  8:14       ` Viresh Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1358955452-20960-4-git-send-email-andriy.shevchenko@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=spear-devel@list.st.com \
    --cc=vinod.koul@intel.com \
    --cc=viresh.linux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome