diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-20 16:20:24 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-20 16:20:24 -0500 |
commit | e6d69a60b77a6ea8d5f9d41765c7571bb8d45531 (patch) | |
tree | 4ea3fe7c49a864da2ce7ffb51a703661826dc15d /drivers/dma/pl330.c | |
parent | 5a1efc6e68a095917277459091fafba6a6baef17 (diff) | |
parent | df12a3178d340319b1955be6b973a4eb84aff754 (diff) |
Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma
Pull slave-dmaengine changes from Vinod Koul:
"This brings for slave dmaengine:
- Change dma notification flag to DMA_COMPLETE from DMA_SUCCESS as
dmaengine can only transfer and not verify validaty of dma
transfers
- Bunch of fixes across drivers:
- cppi41 driver fixes from Daniel
- 8 channel freescale dma engine support and updated bindings from
Hongbo
- msx-dma fixes and cleanup by Markus
- DMAengine updates from Dan:
- Bartlomiej and Dan finalized a rework of the dma address unmap
implementation.
- In the course of testing 1/ a collection of enhancements to
dmatest fell out. Notably basic performance statistics, and
fixed / enhanced test control through new module parameters
'run', 'wait', 'noverify', and 'verbose'. Thanks to Andriy and
Linus [Walleij] for their review.
- Testing the raid related corner cases of 1/ triggered bugs in
the recently added 16-source operation support in the ioatdma
driver.
- Some minor fixes / cleanups to mv_xor and ioatdma"
* 'next' of git://git.infradead.org/users/vkoul/slave-dma: (99 commits)
dma: mv_xor: Fix mis-usage of mmio 'base' and 'high_base' registers
dma: mv_xor: Remove unneeded NULL address check
ioat: fix ioat3_irq_reinit
ioat: kill msix_single_vector support
raid6test: add new corner case for ioatdma driver
ioatdma: clean up sed pool kmem_cache
ioatdma: fix selection of 16 vs 8 source path
ioatdma: fix sed pool selection
ioatdma: Fix bug in selftest after removal of DMA_MEMSET.
dmatest: verbose mode
dmatest: convert to dmaengine_unmap_data
dmatest: add a 'wait' parameter
dmatest: add basic performance metrics
dmatest: add support for skipping verification and random data setup
dmatest: use pseudo random numbers
dmatest: support xor-only, or pq-only channels in tests
dmatest: restore ability to start test at module load and init
dmatest: cleanup redundant "dmatest: " prefixes
dmatest: replace stored results mechanism, with uniform messages
Revert "dmatest: append verify result to results"
...
Diffstat (limited to 'drivers/dma/pl330.c')
-rw-r--r-- | drivers/dma/pl330.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index df8b10fd1726..cdf0483b8f2d 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c | |||
@@ -2268,6 +2268,8 @@ static void pl330_tasklet(unsigned long data) | |||
2268 | list_move_tail(&desc->node, &pch->dmac->desc_pool); | 2268 | list_move_tail(&desc->node, &pch->dmac->desc_pool); |
2269 | } | 2269 | } |
2270 | 2270 | ||
2271 | dma_descriptor_unmap(&desc->txd); | ||
2272 | |||
2271 | if (callback) { | 2273 | if (callback) { |
2272 | spin_unlock_irqrestore(&pch->lock, flags); | 2274 | spin_unlock_irqrestore(&pch->lock, flags); |
2273 | callback(callback_param); | 2275 | callback(callback_param); |
@@ -2314,7 +2316,7 @@ bool pl330_filter(struct dma_chan *chan, void *param) | |||
2314 | return false; | 2316 | return false; |
2315 | 2317 | ||
2316 | peri_id = chan->private; | 2318 | peri_id = chan->private; |
2317 | return *peri_id == (unsigned)param; | 2319 | return *peri_id == (unsigned long)param; |
2318 | } | 2320 | } |
2319 | EXPORT_SYMBOL(pl330_filter); | 2321 | EXPORT_SYMBOL(pl330_filter); |
2320 | 2322 | ||
@@ -2926,16 +2928,23 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) | |||
2926 | 2928 | ||
2927 | amba_set_drvdata(adev, pdmac); | 2929 | amba_set_drvdata(adev, pdmac); |
2928 | 2930 | ||
2929 | irq = adev->irq[0]; | 2931 | for (i = 0; i < AMBA_NR_IRQS; i++) { |
2930 | ret = request_irq(irq, pl330_irq_handler, 0, | 2932 | irq = adev->irq[i]; |
2931 | dev_name(&adev->dev), pi); | 2933 | if (irq) { |
2932 | if (ret) | 2934 | ret = devm_request_irq(&adev->dev, irq, |
2933 | return ret; | 2935 | pl330_irq_handler, 0, |
2936 | dev_name(&adev->dev), pi); | ||
2937 | if (ret) | ||
2938 | return ret; | ||
2939 | } else { | ||
2940 | break; | ||
2941 | } | ||
2942 | } | ||
2934 | 2943 | ||
2935 | pi->pcfg.periph_id = adev->periphid; | 2944 | pi->pcfg.periph_id = adev->periphid; |
2936 | ret = pl330_add(pi); | 2945 | ret = pl330_add(pi); |
2937 | if (ret) | 2946 | if (ret) |
2938 | goto probe_err1; | 2947 | return ret; |
2939 | 2948 | ||
2940 | INIT_LIST_HEAD(&pdmac->desc_pool); | 2949 | INIT_LIST_HEAD(&pdmac->desc_pool); |
2941 | spin_lock_init(&pdmac->pool_lock); | 2950 | spin_lock_init(&pdmac->pool_lock); |
@@ -3033,8 +3042,6 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) | |||
3033 | 3042 | ||
3034 | return 0; | 3043 | return 0; |
3035 | probe_err3: | 3044 | probe_err3: |
3036 | amba_set_drvdata(adev, NULL); | ||
3037 | |||
3038 | /* Idle the DMAC */ | 3045 | /* Idle the DMAC */ |
3039 | list_for_each_entry_safe(pch, _p, &pdmac->ddma.channels, | 3046 | list_for_each_entry_safe(pch, _p, &pdmac->ddma.channels, |
3040 | chan.device_node) { | 3047 | chan.device_node) { |
@@ -3048,8 +3055,6 @@ probe_err3: | |||
3048 | } | 3055 | } |
3049 | probe_err2: | 3056 | probe_err2: |
3050 | pl330_del(pi); | 3057 | pl330_del(pi); |
3051 | probe_err1: | ||
3052 | free_irq(irq, pi); | ||
3053 | 3058 | ||
3054 | return ret; | 3059 | return ret; |
3055 | } | 3060 | } |
@@ -3059,7 +3064,6 @@ static int pl330_remove(struct amba_device *adev) | |||
3059 | struct dma_pl330_dmac *pdmac = amba_get_drvdata(adev); | 3064 | struct dma_pl330_dmac *pdmac = amba_get_drvdata(adev); |
3060 | struct dma_pl330_chan *pch, *_p; | 3065 | struct dma_pl330_chan *pch, *_p; |
3061 | struct pl330_info *pi; | 3066 | struct pl330_info *pi; |
3062 | int irq; | ||
3063 | 3067 | ||
3064 | if (!pdmac) | 3068 | if (!pdmac) |
3065 | return 0; | 3069 | return 0; |
@@ -3068,7 +3072,6 @@ static int pl330_remove(struct amba_device *adev) | |||
3068 | of_dma_controller_free(adev->dev.of_node); | 3072 | of_dma_controller_free(adev->dev.of_node); |
3069 | 3073 | ||
3070 | dma_async_device_unregister(&pdmac->ddma); | 3074 | dma_async_device_unregister(&pdmac->ddma); |
3071 | amba_set_drvdata(adev, NULL); | ||
3072 | 3075 | ||
3073 | /* Idle the DMAC */ | 3076 | /* Idle the DMAC */ |
3074 | list_for_each_entry_safe(pch, _p, &pdmac->ddma.channels, | 3077 | list_for_each_entry_safe(pch, _p, &pdmac->ddma.channels, |
@@ -3086,9 +3089,6 @@ static int pl330_remove(struct amba_device *adev) | |||
3086 | 3089 | ||
3087 | pl330_del(pi); | 3090 | pl330_del(pi); |
3088 | 3091 | ||
3089 | irq = adev->irq[0]; | ||
3090 | free_irq(irq, pi); | ||
3091 | |||
3092 | return 0; | 3092 | return 0; |
3093 | } | 3093 | } |
3094 | 3094 | ||