ste_dma40.c (b55912c66a317d9aaf4749488ca43d510c8a8a87) | ste_dma40.c (0246e77b4d374bb37aa08c3fcadad20012e85ea0) |
---|---|
1/* 2 * driver/dma/ste_dma40.c 3 * 4 * Copyright (C) ST-Ericsson 2007-2010 5 * License terms: GNU General Public License (GPL) version 2 6 * Author: Per Friden <per.friden@stericsson.com> 7 * Author: Jonas Aaberg <jonas.aberg@stericsson.com> 8 * --- 864 unchanged lines hidden (view full) --- 873 874 d40c->pending_tx--; 875 876 if (d40c->pending_tx) 877 tasklet_schedule(&d40c->tasklet); 878 879 spin_unlock_irqrestore(&d40c->lock, flags); 880 | 1/* 2 * driver/dma/ste_dma40.c 3 * 4 * Copyright (C) ST-Ericsson 2007-2010 5 * License terms: GNU General Public License (GPL) version 2 6 * Author: Per Friden <per.friden@stericsson.com> 7 * Author: Jonas Aaberg <jonas.aberg@stericsson.com> 8 * --- 864 unchanged lines hidden (view full) --- 873 874 d40c->pending_tx--; 875 876 if (d40c->pending_tx) 877 tasklet_schedule(&d40c->tasklet); 878 879 spin_unlock_irqrestore(&d40c->lock, flags); 880 |
881 if (callback) | 881 if (callback && (d40d_fin->txd.flags & DMA_PREP_INTERRUPT)) |
882 callback(callback_param); 883 884 return; 885 886 err: 887 /* Rescue manouver if receiving double interrupts */ 888 if (d40c->pending_tx > 0) 889 d40c->pending_tx--; --- 688 unchanged lines hidden (view full) --- 1578 } 1579 1580 (void) d40_log_sg_to_lli(d40c->lcla.src_id, 1581 sgl_src, 1582 sgl_len, 1583 d40d->lli_log.src, 1584 d40c->log_def.lcsp1, 1585 d40c->dma_cfg.src_info.data_width, | 882 callback(callback_param); 883 884 return; 885 886 err: 887 /* Rescue manouver if receiving double interrupts */ 888 if (d40c->pending_tx > 0) 889 d40c->pending_tx--; --- 688 unchanged lines hidden (view full) --- 1578 } 1579 1580 (void) d40_log_sg_to_lli(d40c->lcla.src_id, 1581 sgl_src, 1582 sgl_len, 1583 d40d->lli_log.src, 1584 d40c->log_def.lcsp1, 1585 d40c->dma_cfg.src_info.data_width, |
1586 dma_flags & DMA_PREP_INTERRUPT, | |
1587 d40d->lli_tx_len, 1588 d40c->base->plat_data->llis_per_log); 1589 1590 (void) d40_log_sg_to_lli(d40c->lcla.dst_id, 1591 sgl_dst, 1592 sgl_len, 1593 d40d->lli_log.dst, 1594 d40c->log_def.lcsp3, 1595 d40c->dma_cfg.dst_info.data_width, | 1586 d40d->lli_tx_len, 1587 d40c->base->plat_data->llis_per_log); 1588 1589 (void) d40_log_sg_to_lli(d40c->lcla.dst_id, 1590 sgl_dst, 1591 sgl_len, 1592 d40d->lli_log.dst, 1593 d40c->log_def.lcsp3, 1594 d40c->dma_cfg.dst_info.data_width, |
1596 dma_flags & DMA_PREP_INTERRUPT, | |
1597 d40d->lli_tx_len, 1598 d40c->base->plat_data->llis_per_log); 1599 1600 1601 } else { 1602 if (d40_pool_lli_alloc(d40d, sgl_len, false) < 0) { 1603 dev_err(&d40c->chan.dev->device, 1604 "[%s] Out of memory\n", __func__); 1605 goto err; 1606 } 1607 1608 res = d40_phy_sg_to_lli(sgl_src, 1609 sgl_len, 1610 0, 1611 d40d->lli_phy.src, 1612 d40d->lli_phy.src_addr, 1613 d40c->src_def_cfg, 1614 d40c->dma_cfg.src_info.data_width, | 1595 d40d->lli_tx_len, 1596 d40c->base->plat_data->llis_per_log); 1597 1598 1599 } else { 1600 if (d40_pool_lli_alloc(d40d, sgl_len, false) < 0) { 1601 dev_err(&d40c->chan.dev->device, 1602 "[%s] Out of memory\n", __func__); 1603 goto err; 1604 } 1605 1606 res = d40_phy_sg_to_lli(sgl_src, 1607 sgl_len, 1608 0, 1609 d40d->lli_phy.src, 1610 d40d->lli_phy.src_addr, 1611 d40c->src_def_cfg, 1612 d40c->dma_cfg.src_info.data_width, |
1615 d40c->dma_cfg.src_info.psize, 1616 true); | 1613 d40c->dma_cfg.src_info.psize); |
1617 1618 if (res < 0) 1619 goto err; 1620 1621 res = d40_phy_sg_to_lli(sgl_dst, 1622 sgl_len, 1623 0, 1624 d40d->lli_phy.dst, 1625 d40d->lli_phy.dst_addr, 1626 d40c->dst_def_cfg, 1627 d40c->dma_cfg.dst_info.data_width, | 1614 1615 if (res < 0) 1616 goto err; 1617 1618 res = d40_phy_sg_to_lli(sgl_dst, 1619 sgl_len, 1620 0, 1621 d40d->lli_phy.dst, 1622 d40d->lli_phy.dst_addr, 1623 d40c->dst_def_cfg, 1624 d40c->dma_cfg.dst_info.data_width, |
1628 d40c->dma_cfg.dst_info.psize, 1629 true); | 1625 d40c->dma_cfg.dst_info.psize); |
1630 1631 if (res < 0) 1632 goto err; 1633 1634 (void) dma_map_single(d40c->base->dev, d40d->lli_phy.src, 1635 d40d->lli_pool.size, DMA_TO_DEVICE); 1636 } 1637 --- 270 unchanged lines hidden (view full) --- 1908 1909 total_size = d40_log_sg_to_dev(&d40c->lcla, 1910 sgl, sg_len, 1911 &d40d->lli_log, 1912 &d40c->log_def, 1913 d40c->dma_cfg.src_info.data_width, 1914 d40c->dma_cfg.dst_info.data_width, 1915 direction, | 1626 1627 if (res < 0) 1628 goto err; 1629 1630 (void) dma_map_single(d40c->base->dev, d40d->lli_phy.src, 1631 d40d->lli_pool.size, DMA_TO_DEVICE); 1632 } 1633 --- 270 unchanged lines hidden (view full) --- 1904 1905 total_size = d40_log_sg_to_dev(&d40c->lcla, 1906 sgl, sg_len, 1907 &d40d->lli_log, 1908 &d40c->log_def, 1909 d40c->dma_cfg.src_info.data_width, 1910 d40c->dma_cfg.dst_info.data_width, 1911 direction, |
1916 dma_flags & DMA_PREP_INTERRUPT, | |
1917 dev_addr, d40d->lli_tx_len, 1918 d40c->base->plat_data->llis_per_log); 1919 1920 if (total_size < 0) 1921 return -EINVAL; 1922 1923 return 0; 1924} --- 35 unchanged lines hidden (view full) --- 1960 1961 res = d40_phy_sg_to_lli(sgl, 1962 sgl_len, 1963 src_dev_addr, 1964 d40d->lli_phy.src, 1965 d40d->lli_phy.src_addr, 1966 d40c->src_def_cfg, 1967 d40c->dma_cfg.src_info.data_width, | 1912 dev_addr, d40d->lli_tx_len, 1913 d40c->base->plat_data->llis_per_log); 1914 1915 if (total_size < 0) 1916 return -EINVAL; 1917 1918 return 0; 1919} --- 35 unchanged lines hidden (view full) --- 1955 1956 res = d40_phy_sg_to_lli(sgl, 1957 sgl_len, 1958 src_dev_addr, 1959 d40d->lli_phy.src, 1960 d40d->lli_phy.src_addr, 1961 d40c->src_def_cfg, 1962 d40c->dma_cfg.src_info.data_width, |
1968 d40c->dma_cfg.src_info.psize, 1969 true); | 1963 d40c->dma_cfg.src_info.psize); |
1970 if (res < 0) 1971 return res; 1972 1973 res = d40_phy_sg_to_lli(sgl, 1974 sgl_len, 1975 dst_dev_addr, 1976 d40d->lli_phy.dst, 1977 d40d->lli_phy.dst_addr, 1978 d40c->dst_def_cfg, 1979 d40c->dma_cfg.dst_info.data_width, | 1964 if (res < 0) 1965 return res; 1966 1967 res = d40_phy_sg_to_lli(sgl, 1968 sgl_len, 1969 dst_dev_addr, 1970 d40d->lli_phy.dst, 1971 d40d->lli_phy.dst_addr, 1972 d40c->dst_def_cfg, 1973 d40c->dma_cfg.dst_info.data_width, |
1980 d40c->dma_cfg.dst_info.psize, 1981 true); | 1974 d40c->dma_cfg.dst_info.psize); |
1982 if (res < 0) 1983 return res; 1984 1985 (void) dma_map_single(d40c->base->dev, d40d->lli_phy.src, 1986 d40d->lli_pool.size, DMA_TO_DEVICE); 1987 return 0; 1988} 1989 --- 876 unchanged lines hidden --- | 1975 if (res < 0) 1976 return res; 1977 1978 (void) dma_map_single(d40c->base->dev, d40d->lli_phy.src, 1979 d40d->lli_pool.size, DMA_TO_DEVICE); 1980 return 0; 1981} 1982 --- 876 unchanged lines hidden --- |