diff options
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/dmaengine.c | 2 | ||||
-rw-r--r-- | drivers/dma/dw/core.c | 11 | ||||
-rw-r--r-- | drivers/dma/mv_xor.c | 8 | ||||
-rw-r--r-- | drivers/dma/sa11x0-dma.c | 4 |
4 files changed, 11 insertions, 14 deletions
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index a886713937fd..d5d30ed863ce 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c | |||
@@ -1009,6 +1009,7 @@ static void dmaengine_unmap(struct kref *kref) | |||
1009 | dma_unmap_page(dev, unmap->addr[i], unmap->len, | 1009 | dma_unmap_page(dev, unmap->addr[i], unmap->len, |
1010 | DMA_BIDIRECTIONAL); | 1010 | DMA_BIDIRECTIONAL); |
1011 | } | 1011 | } |
1012 | cnt = unmap->map_cnt; | ||
1012 | mempool_free(unmap, __get_unmap_pool(cnt)->pool); | 1013 | mempool_free(unmap, __get_unmap_pool(cnt)->pool); |
1013 | } | 1014 | } |
1014 | 1015 | ||
@@ -1074,6 +1075,7 @@ dmaengine_get_unmap_data(struct device *dev, int nr, gfp_t flags) | |||
1074 | memset(unmap, 0, sizeof(*unmap)); | 1075 | memset(unmap, 0, sizeof(*unmap)); |
1075 | kref_init(&unmap->kref); | 1076 | kref_init(&unmap->kref); |
1076 | unmap->dev = dev; | 1077 | unmap->dev = dev; |
1078 | unmap->map_cnt = nr; | ||
1077 | 1079 | ||
1078 | return unmap; | 1080 | return unmap; |
1079 | } | 1081 | } |
diff --git a/drivers/dma/dw/core.c b/drivers/dma/dw/core.c index cfdbb92aae1d..7a740769c2fa 100644 --- a/drivers/dma/dw/core.c +++ b/drivers/dma/dw/core.c | |||
@@ -1548,11 +1548,6 @@ int dw_dma_probe(struct dw_dma_chip *chip, struct dw_dma_platform_data *pdata) | |||
1548 | /* Disable BLOCK interrupts as well */ | 1548 | /* Disable BLOCK interrupts as well */ |
1549 | channel_clear_bit(dw, MASK.BLOCK, dw->all_chan_mask); | 1549 | channel_clear_bit(dw, MASK.BLOCK, dw->all_chan_mask); |
1550 | 1550 | ||
1551 | err = devm_request_irq(chip->dev, chip->irq, dw_dma_interrupt, | ||
1552 | IRQF_SHARED, "dw_dmac", dw); | ||
1553 | if (err) | ||
1554 | return err; | ||
1555 | |||
1556 | /* Create a pool of consistent memory blocks for hardware descriptors */ | 1551 | /* Create a pool of consistent memory blocks for hardware descriptors */ |
1557 | dw->desc_pool = dmam_pool_create("dw_dmac_desc_pool", chip->dev, | 1552 | dw->desc_pool = dmam_pool_create("dw_dmac_desc_pool", chip->dev, |
1558 | sizeof(struct dw_desc), 4, 0); | 1553 | sizeof(struct dw_desc), 4, 0); |
@@ -1563,6 +1558,11 @@ int dw_dma_probe(struct dw_dma_chip *chip, struct dw_dma_platform_data *pdata) | |||
1563 | 1558 | ||
1564 | tasklet_init(&dw->tasklet, dw_dma_tasklet, (unsigned long)dw); | 1559 | tasklet_init(&dw->tasklet, dw_dma_tasklet, (unsigned long)dw); |
1565 | 1560 | ||
1561 | err = request_irq(chip->irq, dw_dma_interrupt, IRQF_SHARED, | ||
1562 | "dw_dmac", dw); | ||
1563 | if (err) | ||
1564 | return err; | ||
1565 | |||
1566 | INIT_LIST_HEAD(&dw->dma.channels); | 1566 | INIT_LIST_HEAD(&dw->dma.channels); |
1567 | for (i = 0; i < nr_channels; i++) { | 1567 | for (i = 0; i < nr_channels; i++) { |
1568 | struct dw_dma_chan *dwc = &dw->chan[i]; | 1568 | struct dw_dma_chan *dwc = &dw->chan[i]; |
@@ -1667,6 +1667,7 @@ int dw_dma_remove(struct dw_dma_chip *chip) | |||
1667 | dw_dma_off(dw); | 1667 | dw_dma_off(dw); |
1668 | dma_async_device_unregister(&dw->dma); | 1668 | dma_async_device_unregister(&dw->dma); |
1669 | 1669 | ||
1670 | free_irq(chip->irq, dw); | ||
1670 | tasklet_kill(&dw->tasklet); | 1671 | tasklet_kill(&dw->tasklet); |
1671 | 1672 | ||
1672 | list_for_each_entry_safe(dwc, _dwc, &dw->dma.channels, | 1673 | list_for_each_entry_safe(dwc, _dwc, &dw->dma.channels, |
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c index 766b68ed505c..394cbc5c93e3 100644 --- a/drivers/dma/mv_xor.c +++ b/drivers/dma/mv_xor.c | |||
@@ -191,12 +191,10 @@ static void mv_set_mode(struct mv_xor_chan *chan, | |||
191 | 191 | ||
192 | static void mv_chan_activate(struct mv_xor_chan *chan) | 192 | static void mv_chan_activate(struct mv_xor_chan *chan) |
193 | { | 193 | { |
194 | u32 activation; | ||
195 | |||
196 | dev_dbg(mv_chan_to_devp(chan), " activate chan.\n"); | 194 | dev_dbg(mv_chan_to_devp(chan), " activate chan.\n"); |
197 | activation = readl_relaxed(XOR_ACTIVATION(chan)); | 195 | |
198 | activation |= 0x1; | 196 | /* writel ensures all descriptors are flushed before activation */ |
199 | writel_relaxed(activation, XOR_ACTIVATION(chan)); | 197 | writel(BIT(0), XOR_ACTIVATION(chan)); |
200 | } | 198 | } |
201 | 199 | ||
202 | static char mv_chan_is_busy(struct mv_xor_chan *chan) | 200 | static char mv_chan_is_busy(struct mv_xor_chan *chan) |
diff --git a/drivers/dma/sa11x0-dma.c b/drivers/dma/sa11x0-dma.c index ab26d46bbe15..5ebdfbc1051e 100644 --- a/drivers/dma/sa11x0-dma.c +++ b/drivers/dma/sa11x0-dma.c | |||
@@ -113,11 +113,9 @@ struct sa11x0_dma_phy { | |||
113 | struct sa11x0_dma_desc *txd_load; | 113 | struct sa11x0_dma_desc *txd_load; |
114 | unsigned sg_done; | 114 | unsigned sg_done; |
115 | struct sa11x0_dma_desc *txd_done; | 115 | struct sa11x0_dma_desc *txd_done; |
116 | #ifdef CONFIG_PM_SLEEP | ||
117 | u32 dbs[2]; | 116 | u32 dbs[2]; |
118 | u32 dbt[2]; | 117 | u32 dbt[2]; |
119 | u32 dcsr; | 118 | u32 dcsr; |
120 | #endif | ||
121 | }; | 119 | }; |
122 | 120 | ||
123 | struct sa11x0_dma_dev { | 121 | struct sa11x0_dma_dev { |
@@ -984,7 +982,6 @@ static int sa11x0_dma_remove(struct platform_device *pdev) | |||
984 | return 0; | 982 | return 0; |
985 | } | 983 | } |
986 | 984 | ||
987 | #ifdef CONFIG_PM_SLEEP | ||
988 | static int sa11x0_dma_suspend(struct device *dev) | 985 | static int sa11x0_dma_suspend(struct device *dev) |
989 | { | 986 | { |
990 | struct sa11x0_dma_dev *d = dev_get_drvdata(dev); | 987 | struct sa11x0_dma_dev *d = dev_get_drvdata(dev); |
@@ -1054,7 +1051,6 @@ static int sa11x0_dma_resume(struct device *dev) | |||
1054 | 1051 | ||
1055 | return 0; | 1052 | return 0; |
1056 | } | 1053 | } |
1057 | #endif | ||
1058 | 1054 | ||
1059 | static const struct dev_pm_ops sa11x0_dma_pm_ops = { | 1055 | static const struct dev_pm_ops sa11x0_dma_pm_ops = { |
1060 | .suspend_noirq = sa11x0_dma_suspend, | 1056 | .suspend_noirq = sa11x0_dma_suspend, |