Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: yitian.bu@tangramtek.com (yitian)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/1] dmaengine: dw: fix nollp issue
Date: Mon, 28 Sep 2015 10:55:58 +0800	[thread overview]
Message-ID: <032901d0f999$363fae80$a2bf0b80$@tangramtek.com> (raw)

when channel number is less than maximum number, the register
address of all channels is wrong, which causes the "nollp" flag
is set for all channels even if HW supports llp.

Signed-off-by: Yitian Bu <yitian.bu@tangramtek.com>
---
 drivers/dma/dw/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/dw/core.c b/drivers/dma/dw/core.c
index cf1c87f..c2e9ac8 100644
--- a/drivers/dma/dw/core.c
+++ b/drivers/dma/dw/core.c
@@ -1591,7 +1591,7 @@ int dw_dma_probe(struct dw_dma_chip *chip, struct
dw_dma_platform_data *pdata)
 	INIT_LIST_HEAD(&dw->dma.channels);
 	for (i = 0; i < nr_channels; i++) {
 		struct dw_dma_chan	*dwc = &dw->chan[i];
-		int			r = nr_channels - i - 1;
+		int			r = DW_DMA_MAX_NR_CHANNELS - i - 1;
 
 		dwc->chan.device = &dw->dma;
 		dma_cookie_init(&dwc->chan);
-- 
1.7.12.4

             reply	other threads:[~2015-09-28  2:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-28  2:55 yitian [this message]
2015-09-28  3:12 ` [PATCH 1/1] dmaengine: dw: fix nollp issue Viresh Kumar
2015-09-28  7:00 ` Andy Shevchenko

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='032901d0f999$363fae80$a2bf0b80$@tangramtek.com' \
    --to=yitian.bu@tangramtek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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