aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/ste_dma40.c
diff options
context:
space:
mode:
authorJonas Aaberg <jonas.aberg@stericsson.com>2010-08-09 08:08:10 -0400
committerDan Williams <dan.j.williams@intel.com>2010-09-22 17:53:45 -0400
commit0246e77b4d374bb37aa08c3fcadad20012e85ea0 (patch)
tree62b59fda3aca474abdec3c2385dc3fd00278ef34 /drivers/dma/ste_dma40.c
parentb55912c66a317d9aaf4749488ca43d510c8a8a87 (diff)
DMAENGINE: ste_dma40: fix bug related to callback handling
The callback got called even when it was not supposed to. Also removed some not needed interrupt trigger on/off code. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma/ste_dma40.c')
-rw-r--r--drivers/dma/ste_dma40.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index 1adaebf49774..a6a7d66df77a 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -878,7 +878,7 @@ static void dma_tasklet(unsigned long data)
878 878
879 spin_unlock_irqrestore(&d40c->lock, flags); 879 spin_unlock_irqrestore(&d40c->lock, flags);
880 880
881 if (callback) 881 if (callback && (d40d_fin->txd.flags & DMA_PREP_INTERRUPT))
882 callback(callback_param); 882 callback(callback_param);
883 883
884 return; 884 return;
@@ -1583,7 +1583,6 @@ struct dma_async_tx_descriptor *stedma40_memcpy_sg(struct dma_chan *chan,
1583 d40d->lli_log.src, 1583 d40d->lli_log.src,
1584 d40c->log_def.lcsp1, 1584 d40c->log_def.lcsp1,
1585 d40c->dma_cfg.src_info.data_width, 1585 d40c->dma_cfg.src_info.data_width,
1586 dma_flags & DMA_PREP_INTERRUPT,
1587 d40d->lli_tx_len, 1586 d40d->lli_tx_len,
1588 d40c->base->plat_data->llis_per_log); 1587 d40c->base->plat_data->llis_per_log);
1589 1588
@@ -1593,7 +1592,6 @@ struct dma_async_tx_descriptor *stedma40_memcpy_sg(struct dma_chan *chan,
1593 d40d->lli_log.dst, 1592 d40d->lli_log.dst,
1594 d40c->log_def.lcsp3, 1593 d40c->log_def.lcsp3,
1595 d40c->dma_cfg.dst_info.data_width, 1594 d40c->dma_cfg.dst_info.data_width,
1596 dma_flags & DMA_PREP_INTERRUPT,
1597 d40d->lli_tx_len, 1595 d40d->lli_tx_len,
1598 d40c->base->plat_data->llis_per_log); 1596 d40c->base->plat_data->llis_per_log);
1599 1597
@@ -1612,8 +1610,7 @@ struct dma_async_tx_descriptor *stedma40_memcpy_sg(struct dma_chan *chan,
1612 d40d->lli_phy.src_addr, 1610 d40d->lli_phy.src_addr,
1613 d40c->src_def_cfg, 1611 d40c->src_def_cfg,
1614 d40c->dma_cfg.src_info.data_width, 1612 d40c->dma_cfg.src_info.data_width,
1615 d40c->dma_cfg.src_info.psize, 1613 d40c->dma_cfg.src_info.psize);
1616 true);
1617 1614
1618 if (res < 0) 1615 if (res < 0)
1619 goto err; 1616 goto err;
@@ -1625,8 +1622,7 @@ struct dma_async_tx_descriptor *stedma40_memcpy_sg(struct dma_chan *chan,
1625 d40d->lli_phy.dst_addr, 1622 d40d->lli_phy.dst_addr,
1626 d40c->dst_def_cfg, 1623 d40c->dst_def_cfg,
1627 d40c->dma_cfg.dst_info.data_width, 1624 d40c->dma_cfg.dst_info.data_width,
1628 d40c->dma_cfg.dst_info.psize, 1625 d40c->dma_cfg.dst_info.psize);
1629 true);
1630 1626
1631 if (res < 0) 1627 if (res < 0)
1632 goto err; 1628 goto err;
@@ -1913,7 +1909,6 @@ static int d40_prep_slave_sg_log(struct d40_desc *d40d,
1913 d40c->dma_cfg.src_info.data_width, 1909 d40c->dma_cfg.src_info.data_width,
1914 d40c->dma_cfg.dst_info.data_width, 1910 d40c->dma_cfg.dst_info.data_width,
1915 direction, 1911 direction,
1916 dma_flags & DMA_PREP_INTERRUPT,
1917 dev_addr, d40d->lli_tx_len, 1912 dev_addr, d40d->lli_tx_len,
1918 d40c->base->plat_data->llis_per_log); 1913 d40c->base->plat_data->llis_per_log);
1919 1914
@@ -1965,8 +1960,7 @@ static int d40_prep_slave_sg_phy(struct d40_desc *d40d,
1965 d40d->lli_phy.src_addr, 1960 d40d->lli_phy.src_addr,
1966 d40c->src_def_cfg, 1961 d40c->src_def_cfg,
1967 d40c->dma_cfg.src_info.data_width, 1962 d40c->dma_cfg.src_info.data_width,
1968 d40c->dma_cfg.src_info.psize, 1963 d40c->dma_cfg.src_info.psize);
1969 true);
1970 if (res < 0) 1964 if (res < 0)
1971 return res; 1965 return res;
1972 1966
@@ -1977,8 +1971,7 @@ static int d40_prep_slave_sg_phy(struct d40_desc *d40d,
1977 d40d->lli_phy.dst_addr, 1971 d40d->lli_phy.dst_addr,
1978 d40c->dst_def_cfg, 1972 d40c->dst_def_cfg,
1979 d40c->dma_cfg.dst_info.data_width, 1973 d40c->dma_cfg.dst_info.data_width,
1980 d40c->dma_cfg.dst_info.psize, 1974 d40c->dma_cfg.dst_info.psize);
1981 true);
1982 if (res < 0) 1975 if (res < 0)
1983 return res; 1976 return res;
1984 1977