Loading drivers/dma/coh901318.c +26 −4 Original line number Diff line number Diff line Loading @@ -266,7 +266,7 @@ static int dma_memcpy_channels[] = { COH901318_CX_CTRL_DDMA_LEGACY | \ COH901318_CX_CTRL_PRDD_SOURCE) const struct coh_dma_channel chan_config[U300_DMA_CHANNELS] = { static const struct coh_dma_channel chan_config[U300_DMA_CHANNELS] = { { .number = U300_DMA_MSL_TX_0, .name = "MSL TX 0", Loading Loading @@ -1280,6 +1280,7 @@ struct coh901318_desc { struct coh901318_base { struct device *dev; void __iomem *virtbase; unsigned int irq; struct coh901318_pool pool; struct powersave pm; struct dma_device dma_slave; Loading Loading @@ -1364,7 +1365,6 @@ static int coh901318_debugfs_read(struct file *file, char __user *buf, } static const struct file_operations coh901318_debugfs_status_operations = { .owner = THIS_MODULE, .open = simple_open, .read = coh901318_debugfs_read, .llseek = default_llseek, Loading Loading @@ -2680,6 +2680,8 @@ static int __init coh901318_probe(struct platform_device *pdev) if (err) return err; base->irq = irq; err = coh901318_pool_create(&base->pool, &pdev->dev, sizeof(struct coh901318_lli), 32); Loading Loading @@ -2755,11 +2757,31 @@ static int __init coh901318_probe(struct platform_device *pdev) coh901318_pool_destroy(&base->pool); return err; } static void coh901318_base_remove(struct coh901318_base *base, const int *pick_chans) { int chans_i; int i = 0; struct coh901318_chan *cohc; for (chans_i = 0; pick_chans[chans_i] != -1; chans_i += 2) { for (i = pick_chans[chans_i]; i <= pick_chans[chans_i+1]; i++) { cohc = &base->chans[i]; tasklet_kill(&cohc->tasklet); } } } static int coh901318_remove(struct platform_device *pdev) { struct coh901318_base *base = platform_get_drvdata(pdev); devm_free_irq(&pdev->dev, base->irq, base); coh901318_base_remove(base, dma_slave_channels); coh901318_base_remove(base, dma_memcpy_channels); of_dma_controller_free(pdev->dev.of_node); dma_async_device_unregister(&base->dma_memcpy); dma_async_device_unregister(&base->dma_slave); Loading @@ -2780,13 +2802,13 @@ static struct platform_driver coh901318_driver = { }, }; int __init coh901318_init(void) static int __init coh901318_init(void) { return platform_driver_probe(&coh901318_driver, coh901318_probe); } subsys_initcall(coh901318_init); void __exit coh901318_exit(void) static void __exit coh901318_exit(void) { platform_driver_unregister(&coh901318_driver); } Loading drivers/dma/cppi41.c +0 −3 Original line number Diff line number Diff line Loading @@ -497,16 +497,13 @@ static struct dma_async_tx_descriptor *cppi41_dma_prep_slave_sg( struct cppi41_desc *d; struct scatterlist *sg; unsigned int i; unsigned int num; num = 0; d = c->desc; for_each_sg(sgl, sg, sg_len, i) { u32 addr; u32 len; /* We need to use more than one desc once musb supports sg */ BUG_ON(num > 0); addr = lower_32_bits(sg_dma_address(sg)); len = sg_dma_len(sg); Loading drivers/dma/dma-jz4740.c +14 −0 Original line number Diff line number Diff line Loading @@ -573,12 +573,26 @@ static int jz4740_dma_probe(struct platform_device *pdev) return ret; } static void jz4740_cleanup_vchan(struct dma_device *dmadev) { struct jz4740_dmaengine_chan *chan, *_chan; list_for_each_entry_safe(chan, _chan, &dmadev->channels, vchan.chan.device_node) { list_del(&chan->vchan.chan.device_node); tasklet_kill(&chan->vchan.task); } } static int jz4740_dma_remove(struct platform_device *pdev) { struct jz4740_dma_dev *dmadev = platform_get_drvdata(pdev); int irq = platform_get_irq(pdev, 0); free_irq(irq, dmadev); jz4740_cleanup_vchan(&dmadev->ddev); dma_async_device_unregister(&dmadev->ddev); clk_disable_unprepare(dmadev->clk); Loading drivers/dma/edma.c +21 −0 Original line number Diff line number Diff line Loading @@ -239,6 +239,9 @@ struct edma_cc { bool chmap_exist; enum dma_event_q default_queue; unsigned int ccint; unsigned int ccerrint; /* * The slot_inuse bit for each PaRAM slot is clear unless the slot is * in use by Linux or if it is allocated to be used by DSP. Loading Loading @@ -2283,6 +2286,7 @@ static int edma_probe(struct platform_device *pdev) dev_err(dev, "CCINT (%d) failed --> %d\n", irq, ret); return ret; } ecc->ccint = irq; } irq = platform_get_irq_byname(pdev, "edma3_ccerrint"); Loading @@ -2298,6 +2302,7 @@ static int edma_probe(struct platform_device *pdev) dev_err(dev, "CCERRINT (%d) failed --> %d\n", irq, ret); return ret; } ecc->ccerrint = irq; } ecc->dummy_slot = edma_alloc_slot(ecc, EDMA_SLOT_ANY); Loading Loading @@ -2388,11 +2393,27 @@ static int edma_probe(struct platform_device *pdev) return ret; } static void edma_cleanupp_vchan(struct dma_device *dmadev) { struct edma_chan *echan, *_echan; list_for_each_entry_safe(echan, _echan, &dmadev->channels, vchan.chan.device_node) { list_del(&echan->vchan.chan.device_node); tasklet_kill(&echan->vchan.task); } } static int edma_remove(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct edma_cc *ecc = dev_get_drvdata(dev); devm_free_irq(dev, ecc->ccint, ecc); devm_free_irq(dev, ecc->ccerrint, ecc); edma_cleanupp_vchan(&ecc->dma_slave); if (dev->of_node) of_dma_controller_free(dev->of_node); dma_async_device_unregister(&ecc->dma_slave); Loading drivers/dma/fsl-edma.c +24 −0 Original line number Diff line number Diff line Loading @@ -852,6 +852,17 @@ fsl_edma_irq_init(struct platform_device *pdev, struct fsl_edma_engine *fsl_edma return 0; } static void fsl_edma_irq_exit( struct platform_device *pdev, struct fsl_edma_engine *fsl_edma) { if (fsl_edma->txirq == fsl_edma->errirq) { devm_free_irq(&pdev->dev, fsl_edma->txirq, fsl_edma); } else { devm_free_irq(&pdev->dev, fsl_edma->txirq, fsl_edma); devm_free_irq(&pdev->dev, fsl_edma->errirq, fsl_edma); } } static void fsl_disable_clocks(struct fsl_edma_engine *fsl_edma) { int i; Loading Loading @@ -984,11 +995,24 @@ static int fsl_edma_probe(struct platform_device *pdev) return 0; } static void fsl_edma_cleanup_vchan(struct dma_device *dmadev) { struct fsl_edma_chan *chan, *_chan; list_for_each_entry_safe(chan, _chan, &dmadev->channels, vchan.chan.device_node) { list_del(&chan->vchan.chan.device_node); tasklet_kill(&chan->vchan.task); } } static int fsl_edma_remove(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; struct fsl_edma_engine *fsl_edma = platform_get_drvdata(pdev); fsl_edma_irq_exit(pdev, fsl_edma); fsl_edma_cleanup_vchan(&fsl_edma->dma_dev); of_dma_controller_free(np); dma_async_device_unregister(&fsl_edma->dma_dev); fsl_disable_clocks(fsl_edma); Loading Loading
drivers/dma/coh901318.c +26 −4 Original line number Diff line number Diff line Loading @@ -266,7 +266,7 @@ static int dma_memcpy_channels[] = { COH901318_CX_CTRL_DDMA_LEGACY | \ COH901318_CX_CTRL_PRDD_SOURCE) const struct coh_dma_channel chan_config[U300_DMA_CHANNELS] = { static const struct coh_dma_channel chan_config[U300_DMA_CHANNELS] = { { .number = U300_DMA_MSL_TX_0, .name = "MSL TX 0", Loading Loading @@ -1280,6 +1280,7 @@ struct coh901318_desc { struct coh901318_base { struct device *dev; void __iomem *virtbase; unsigned int irq; struct coh901318_pool pool; struct powersave pm; struct dma_device dma_slave; Loading Loading @@ -1364,7 +1365,6 @@ static int coh901318_debugfs_read(struct file *file, char __user *buf, } static const struct file_operations coh901318_debugfs_status_operations = { .owner = THIS_MODULE, .open = simple_open, .read = coh901318_debugfs_read, .llseek = default_llseek, Loading Loading @@ -2680,6 +2680,8 @@ static int __init coh901318_probe(struct platform_device *pdev) if (err) return err; base->irq = irq; err = coh901318_pool_create(&base->pool, &pdev->dev, sizeof(struct coh901318_lli), 32); Loading Loading @@ -2755,11 +2757,31 @@ static int __init coh901318_probe(struct platform_device *pdev) coh901318_pool_destroy(&base->pool); return err; } static void coh901318_base_remove(struct coh901318_base *base, const int *pick_chans) { int chans_i; int i = 0; struct coh901318_chan *cohc; for (chans_i = 0; pick_chans[chans_i] != -1; chans_i += 2) { for (i = pick_chans[chans_i]; i <= pick_chans[chans_i+1]; i++) { cohc = &base->chans[i]; tasklet_kill(&cohc->tasklet); } } } static int coh901318_remove(struct platform_device *pdev) { struct coh901318_base *base = platform_get_drvdata(pdev); devm_free_irq(&pdev->dev, base->irq, base); coh901318_base_remove(base, dma_slave_channels); coh901318_base_remove(base, dma_memcpy_channels); of_dma_controller_free(pdev->dev.of_node); dma_async_device_unregister(&base->dma_memcpy); dma_async_device_unregister(&base->dma_slave); Loading @@ -2780,13 +2802,13 @@ static struct platform_driver coh901318_driver = { }, }; int __init coh901318_init(void) static int __init coh901318_init(void) { return platform_driver_probe(&coh901318_driver, coh901318_probe); } subsys_initcall(coh901318_init); void __exit coh901318_exit(void) static void __exit coh901318_exit(void) { platform_driver_unregister(&coh901318_driver); } Loading
drivers/dma/cppi41.c +0 −3 Original line number Diff line number Diff line Loading @@ -497,16 +497,13 @@ static struct dma_async_tx_descriptor *cppi41_dma_prep_slave_sg( struct cppi41_desc *d; struct scatterlist *sg; unsigned int i; unsigned int num; num = 0; d = c->desc; for_each_sg(sgl, sg, sg_len, i) { u32 addr; u32 len; /* We need to use more than one desc once musb supports sg */ BUG_ON(num > 0); addr = lower_32_bits(sg_dma_address(sg)); len = sg_dma_len(sg); Loading
drivers/dma/dma-jz4740.c +14 −0 Original line number Diff line number Diff line Loading @@ -573,12 +573,26 @@ static int jz4740_dma_probe(struct platform_device *pdev) return ret; } static void jz4740_cleanup_vchan(struct dma_device *dmadev) { struct jz4740_dmaengine_chan *chan, *_chan; list_for_each_entry_safe(chan, _chan, &dmadev->channels, vchan.chan.device_node) { list_del(&chan->vchan.chan.device_node); tasklet_kill(&chan->vchan.task); } } static int jz4740_dma_remove(struct platform_device *pdev) { struct jz4740_dma_dev *dmadev = platform_get_drvdata(pdev); int irq = platform_get_irq(pdev, 0); free_irq(irq, dmadev); jz4740_cleanup_vchan(&dmadev->ddev); dma_async_device_unregister(&dmadev->ddev); clk_disable_unprepare(dmadev->clk); Loading
drivers/dma/edma.c +21 −0 Original line number Diff line number Diff line Loading @@ -239,6 +239,9 @@ struct edma_cc { bool chmap_exist; enum dma_event_q default_queue; unsigned int ccint; unsigned int ccerrint; /* * The slot_inuse bit for each PaRAM slot is clear unless the slot is * in use by Linux or if it is allocated to be used by DSP. Loading Loading @@ -2283,6 +2286,7 @@ static int edma_probe(struct platform_device *pdev) dev_err(dev, "CCINT (%d) failed --> %d\n", irq, ret); return ret; } ecc->ccint = irq; } irq = platform_get_irq_byname(pdev, "edma3_ccerrint"); Loading @@ -2298,6 +2302,7 @@ static int edma_probe(struct platform_device *pdev) dev_err(dev, "CCERRINT (%d) failed --> %d\n", irq, ret); return ret; } ecc->ccerrint = irq; } ecc->dummy_slot = edma_alloc_slot(ecc, EDMA_SLOT_ANY); Loading Loading @@ -2388,11 +2393,27 @@ static int edma_probe(struct platform_device *pdev) return ret; } static void edma_cleanupp_vchan(struct dma_device *dmadev) { struct edma_chan *echan, *_echan; list_for_each_entry_safe(echan, _echan, &dmadev->channels, vchan.chan.device_node) { list_del(&echan->vchan.chan.device_node); tasklet_kill(&echan->vchan.task); } } static int edma_remove(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct edma_cc *ecc = dev_get_drvdata(dev); devm_free_irq(dev, ecc->ccint, ecc); devm_free_irq(dev, ecc->ccerrint, ecc); edma_cleanupp_vchan(&ecc->dma_slave); if (dev->of_node) of_dma_controller_free(dev->of_node); dma_async_device_unregister(&ecc->dma_slave); Loading
drivers/dma/fsl-edma.c +24 −0 Original line number Diff line number Diff line Loading @@ -852,6 +852,17 @@ fsl_edma_irq_init(struct platform_device *pdev, struct fsl_edma_engine *fsl_edma return 0; } static void fsl_edma_irq_exit( struct platform_device *pdev, struct fsl_edma_engine *fsl_edma) { if (fsl_edma->txirq == fsl_edma->errirq) { devm_free_irq(&pdev->dev, fsl_edma->txirq, fsl_edma); } else { devm_free_irq(&pdev->dev, fsl_edma->txirq, fsl_edma); devm_free_irq(&pdev->dev, fsl_edma->errirq, fsl_edma); } } static void fsl_disable_clocks(struct fsl_edma_engine *fsl_edma) { int i; Loading Loading @@ -984,11 +995,24 @@ static int fsl_edma_probe(struct platform_device *pdev) return 0; } static void fsl_edma_cleanup_vchan(struct dma_device *dmadev) { struct fsl_edma_chan *chan, *_chan; list_for_each_entry_safe(chan, _chan, &dmadev->channels, vchan.chan.device_node) { list_del(&chan->vchan.chan.device_node); tasklet_kill(&chan->vchan.task); } } static int fsl_edma_remove(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; struct fsl_edma_engine *fsl_edma = platform_get_drvdata(pdev); fsl_edma_irq_exit(pdev, fsl_edma); fsl_edma_cleanup_vchan(&fsl_edma->dma_dev); of_dma_controller_free(np); dma_async_device_unregister(&fsl_edma->dma_dev); fsl_disable_clocks(fsl_edma); Loading