Discussion:
[PATCH 00/12] dmaengine: remove users of device_control
Vinod Koul
2014-10-11 15:39:33 UTC
Permalink
The recent discussion [1] on the API have resulted in moving away from
device_control ioctl method to proper channel APIs.
There are still few users on the device_control which should use the wrappers
existing rather than access device_control.
This will aid us in deprecating and removing device_control, possibly after
the merge window.

These can be merged thru respective subsystem tree or dmaengine tree. Either
way please just let me know.

Feng's kbuild has tested these as well [2]

[1]: http://www.spinics.net/lists/dmaengine/msg02212.html
[2]: http://git.infradead.org/users/vkoul/slave-dma.git/shortlog/refs/heads/topic/dma_control_cleanup

Vinod Koul (12):
pata_arasan_cf: use dmaengine_terminate_all() API
dmaengine: coh901318: use dmaengine_terminate_all() API
[media] V4L2: mx3_camer: use dmaengine_pause() API
mtd: fsmc_nand: use dmaengine_terminate_all() API
mtd: sh_flctl: use dmaengine_terminate_all() API
net: ks8842: use dmaengine_terminate_all() API
spi/atmel: use dmaengine_terminate_all() API
spi/spi-dw-mid.c: use dmaengine_slave_config() API
serial: sh-sci: use dmaengine_terminate_all() API
usb: musb: ux500_dma: use dmaengine_xxx() APIs
ASoC: txx9: use dmaengine_terminate_all() API
video: mx3fb: use dmaengine_terminate_all() API

drivers/ata/pata_arasan_cf.c | 5 ++---
drivers/dma/coh901318.c | 2 +-
drivers/media/platform/soc_camera/mx3_camera.c | 6 ++----
drivers/mtd/nand/fsmc_nand.c | 2 +-
drivers/mtd/nand/sh_flctl.c | 2 +-
drivers/net/ethernet/micrel/ks8842.c | 6 ++----
drivers/spi/spi-atmel.c | 6 ++----
drivers/spi/spi-dw-mid.c | 6 ++----
drivers/tty/serial/sh-sci.c | 2 +-
drivers/usb/musb/ux500_dma.c | 7 ++-----
drivers/video/fbdev/mx3fb.c | 3 +--
sound/soc/txx9/txx9aclc.c | 7 +++----
12 files changed, 20 insertions(+), 34 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Vinod Koul
2014-10-11 15:40:29 UTC
Permalink
The drivers should use dmaengine_terminate_all() API instead of accessing
the device_control which will be deprecated soon

Signed-off-by: Vinod Koul <***@intel.com>
---
drivers/ata/pata_arasan_cf.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c
index 4edb1a8..38216b9 100644
--- a/drivers/ata/pata_arasan_cf.c
+++ b/drivers/ata/pata_arasan_cf.c
@@ -420,7 +420,7 @@ dma_xfer(struct arasan_cf_dev *acdev, dma_addr_t src, dma_addr_t dest, u32 len)

/* Wait for DMA to complete */
if (!wait_for_completion_timeout(&acdev->dma_completion, TIMEOUT)) {
- chan->device->device_control(chan, DMA_TERMINATE_ALL, 0);
+ dmaengine_terminate_all(chan);
dev_err(acdev->host->dev, "wait_for_completion_timeout\n");
return -ETIMEDOUT;
}
@@ -928,8 +928,7 @@ static int arasan_cf_suspend(struct device *dev)
struct arasan_cf_dev *acdev = host->ports[0]->private_data;

if (acdev->dma_chan)
- acdev->dma_chan->device->device_control(acdev->dma_chan,
- DMA_TERMINATE_ALL, 0);
+ dmaengine_terminate_all(acdev->dma_chan);

cf_exit(acdev);
return ata_host_suspend(host, PMSG_SUSPEND);
--
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Viresh Kumar
2014-10-13 02:47:23 UTC
Permalink
Post by Vinod Koul
The drivers should use dmaengine_terminate_all() API instead of accessing
the device_control which will be deprecated soon
---
drivers/ata/pata_arasan_cf.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c
index 4edb1a8..38216b9 100644
--- a/drivers/ata/pata_arasan_cf.c
+++ b/drivers/ata/pata_arasan_cf.c
@@ -420,7 +420,7 @@ dma_xfer(struct arasan_cf_dev *acdev, dma_addr_t src, dma_addr_t dest, u32 len)
/* Wait for DMA to complete */
if (!wait_for_completion_timeout(&acdev->dma_completion, TIMEOUT)) {
- chan->device->device_control(chan, DMA_TERMINATE_ALL, 0);
+ dmaengine_terminate_all(chan);
dev_err(acdev->host->dev, "wait_for_completion_timeout\n");
return -ETIMEDOUT;
}
@@ -928,8 +928,7 @@ static int arasan_cf_suspend(struct device *dev)
struct arasan_cf_dev *acdev = host->ports[0]->private_data;
if (acdev->dma_chan)
- acdev->dma_chan->device->device_control(acdev->dma_chan,
- DMA_TERMINATE_ALL, 0);
+ dmaengine_terminate_all(acdev->dma_chan);
cf_exit(acdev);
return ata_host_suspend(host, PMSG_SUSPEND);
Acked-by: Viresh Kumar <***@linaro.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Vinod Koul
2014-10-15 15:58:00 UTC
Permalink
Post by Vinod Koul
The recent discussion [1] on the API have resulted in moving away from
device_control ioctl method to proper channel APIs.
There are still few users on the device_control which should use the wrappers
existing rather than access device_control.
This will aid us in deprecating and removing device_control, possibly after
the merge window.
These can be merged thru respective subsystem tree or dmaengine tree. Either
way please just let me know.
Applying to dmaengine-next with acks recived, dropping the ones which are
applied by respective folks
--
~Vinod
Post by Vinod Koul
Feng's kbuild has tested these as well [2]
[1]: http://www.spinics.net/lists/dmaengine/msg02212.html
[2]: http://git.infradead.org/users/vkoul/slave-dma.git/shortlog/refs/heads/topic/dma_control_cleanup
pata_arasan_cf: use dmaengine_terminate_all() API
dmaengine: coh901318: use dmaengine_terminate_all() API
[media] V4L2: mx3_camer: use dmaengine_pause() API
mtd: fsmc_nand: use dmaengine_terminate_all() API
mtd: sh_flctl: use dmaengine_terminate_all() API
net: ks8842: use dmaengine_terminate_all() API
spi/atmel: use dmaengine_terminate_all() API
spi/spi-dw-mid.c: use dmaengine_slave_config() API
serial: sh-sci: use dmaengine_terminate_all() API
usb: musb: ux500_dma: use dmaengine_xxx() APIs
ASoC: txx9: use dmaengine_terminate_all() API
video: mx3fb: use dmaengine_terminate_all() API
drivers/ata/pata_arasan_cf.c | 5 ++---
drivers/dma/coh901318.c | 2 +-
drivers/media/platform/soc_camera/mx3_camera.c | 6 ++----
drivers/mtd/nand/fsmc_nand.c | 2 +-
drivers/mtd/nand/sh_flctl.c | 2 +-
drivers/net/ethernet/micrel/ks8842.c | 6 ++----
drivers/spi/spi-atmel.c | 6 ++----
drivers/spi/spi-dw-mid.c | 6 ++----
drivers/tty/serial/sh-sci.c | 2 +-
drivers/usb/musb/ux500_dma.c | 7 ++-----
drivers/video/fbdev/mx3fb.c | 3 +--
sound/soc/txx9/txx9aclc.c | 7 +++----
12 files changed, 20 insertions(+), 34 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Loading...