dmaengine i.MX SDMA: initialize dma capabilities outside channel loop
The capabilities are device specific fields, not channel specific fields. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
7a0e9b2557
commit
7214a8b14f
|
@ -1295,6 +1295,9 @@ static int __init sdma_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
sdma->version = pdata->sdma_version;
|
sdma->version = pdata->sdma_version;
|
||||||
|
|
||||||
|
dma_cap_set(DMA_SLAVE, sdma->dma_device.cap_mask);
|
||||||
|
dma_cap_set(DMA_CYCLIC, sdma->dma_device.cap_mask);
|
||||||
|
|
||||||
INIT_LIST_HEAD(&sdma->dma_device.channels);
|
INIT_LIST_HEAD(&sdma->dma_device.channels);
|
||||||
/* Initialize channel parameters */
|
/* Initialize channel parameters */
|
||||||
for (i = 0; i < MAX_DMA_CHANNELS; i++) {
|
for (i = 0; i < MAX_DMA_CHANNELS; i++) {
|
||||||
|
@ -1303,9 +1306,6 @@ static int __init sdma_probe(struct platform_device *pdev)
|
||||||
sdmac->sdma = sdma;
|
sdmac->sdma = sdma;
|
||||||
spin_lock_init(&sdmac->lock);
|
spin_lock_init(&sdmac->lock);
|
||||||
|
|
||||||
dma_cap_set(DMA_SLAVE, sdma->dma_device.cap_mask);
|
|
||||||
dma_cap_set(DMA_CYCLIC, sdma->dma_device.cap_mask);
|
|
||||||
|
|
||||||
sdmac->chan.device = &sdma->dma_device;
|
sdmac->chan.device = &sdma->dma_device;
|
||||||
sdmac->channel = i;
|
sdmac->channel = i;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue