Skip to content

Commit

Permalink
pch_dma: fix dma direction issue for ML7213 IOH video-in
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tomoya MORINAGA authored and Vinod Koul committed May 9, 2011
1 parent e257e15 commit c8fcba6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/dma/pch_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit c8fcba6

Please sign in to comment.