diff options
author | Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com> | 2011-05-09 09:09:35 +0200 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2011-05-09 13:42:23 +0200 |
commit | c8fcba600c46c5d7667ec230b1d9ce3ce5859f9c (patch) | |
tree | 65d37c132a9ddd26edbaff9dddb27cc9a3047058 /drivers/dma | |
parent | dmaengine: at_hdmac: use descriptor chaining help function (diff) | |
download | linux-c8fcba600c46c5d7667ec230b1d9ce3ce5859f9c.tar.xz linux-c8fcba600c46c5d7667ec230b1d9ce3ce5859f9c.zip |
pch_dma: fix dma direction issue for ML7213 IOH video-in
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>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | 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 6eebc6205c65..d28c47a42f14 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 = ®s->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); |