public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 1/5] pch_dma: fix dma direction issue for ML7213 IOH video-in
@ 2011-05-09  3:40 Tomoya MORINAGA
  2011-05-09  3:40 ` [PATCH V2 2/5] pch_dma: modify for checkpatch Tomoya MORINAGA
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Tomoya MORINAGA @ 2011-05-09  3:40 UTC (permalink / raw)
  To: Dan Williams, Vinod Koul, linux-kernel
  Cc: qi.wang, yong.y.wang, joel.clark, kok.howg.ewe, toshiharu-linux,
	Tomoya MORINAGA

Currently, even-channel number is set as tx direction and odd is set as rx.
However, though video-in uses ch6, the direction is not tx but rx.
This patch sets video-in's DMA direction correctly.

Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
---
V2: Update Koul-Vinod's comments
---
 drivers/dma/pch_dma.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/dma/pch_dma.c b/drivers/dma/pch_dma.c
index 8d8fef1..c84b18d 100644
--- a/drivers/dma/pch_dma.c
+++ b/drivers/dma/pch_dma.c
@@ -478,7 +478,6 @@ static int pd_alloc_chan_resources(struct dma_chan *chan)
 	spin_unlock_bh(&pd_chan->lock);
 
 	pdc_enable_irq(chan, 1);
-	pdc_set_dir(chan);
 
 	return pd_chan->descs_allocated;
 }
@@ -561,6 +560,9 @@ static struct dma_async_tx_descriptor *pd_prep_slave_sg(struct dma_chan *chan,
 	else
 		return NULL;
 
+	pd_chan->dir = direction;
+	pdc_set_dir(chan);
+
 	for_each_sg(sgl, sg, sg_len, i) {
 		desc = pdc_desc_get(pd_chan);
 
@@ -850,8 +852,6 @@ static int __devinit pch_dma_probe(struct pci_dev *pdev,
 
 		pd_chan->membase = &regs->desc[i];
 
-		pd_chan->dir = (i % 2) ? DMA_FROM_DEVICE : DMA_TO_DEVICE;
-
 		spin_lock_init(&pd_chan->lock);
 
 		INIT_LIST_HEAD(&pd_chan->active_list);
-- 
1.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-05-09  5:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-09  3:40 [PATCH V2 1/5] pch_dma: fix dma direction issue for ML7213 IOH video-in Tomoya MORINAGA
2011-05-09  3:40 ` [PATCH V2 2/5] pch_dma: modify for checkpatch Tomoya MORINAGA
2011-05-09  4:02   ` Joe Perches
2011-05-09  5:27     ` Tomoya MORINAGA
2011-05-09  3:40 ` [PATCH V2 3/5] pch_dma: Fix DMA setting issue Tomoya MORINAGA
2011-05-09  3:40 ` [PATCH V2 4/5] pch_dma: Support I2S for ML7213 IOH Tomoya MORINAGA

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox