From 4fdcf68487e520844e077f75943b1e04cc05943b Mon Sep 17 00:00:00 2001 From: Vinod Koul Date: Sat, 11 Oct 2014 21:16:45 +0530 Subject: carma-fpga: use dmaengine_xxx() API The drivers should use dmaengine_slave_config() and dmaengine_prep_dma_sg() API instead of accessing the device_control which will be deprecated soon Signed-off-by: Vinod Koul --- drivers/misc/carma/carma-fpga-program.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'drivers/misc/carma') diff --git a/drivers/misc/carma/carma-fpga-program.c b/drivers/misc/carma/carma-fpga-program.c index 7be89832db19..fd0cb8b1eefb 100644 --- a/drivers/misc/carma/carma-fpga-program.c +++ b/drivers/misc/carma/carma-fpga-program.c @@ -518,8 +518,7 @@ static noinline int fpga_program_dma(struct fpga_dev *priv) config.direction = DMA_MEM_TO_DEV; config.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; config.dst_maxburst = fpga_fifo_size(priv->regs) / 2 / 4; - ret = chan->device->device_control(chan, DMA_SLAVE_CONFIG, - (unsigned long)&config); + ret = dmaengine_slave_config(chan, &config); if (ret) { dev_err(priv->dev, "DMA slave configuration failed\n"); goto out_dma_unmap; @@ -532,9 +531,9 @@ static noinline int fpga_program_dma(struct fpga_dev *priv) } /* setup and submit the DMA transaction */ - tx = chan->device->device_prep_dma_sg(chan, - table.sgl, num_pages, - vb->sglist, vb->sglen, 0); + + tx = dmaengine_prep_dma_sg(chan, table.sgl, num_pages, + vb->sglist, vb->sglen, 0); if (!tx) { dev_err(priv->dev, "Unable to prep DMA transaction\n"); ret = -ENOMEM; -- cgit v1.2.3-59-g8ed1b From 7abfe6eca8f978f090b3c203cfb53d37a66ea9f2 Mon Sep 17 00:00:00 2001 From: Vinod Koul Date: Sat, 11 Oct 2014 21:16:46 +0530 Subject: carma-fpga: move to fsl_dma_external_start() carma-fpga driver uses device control with custom FSLDMA_EXTERNAL_START command. Since we wnat to deprecate the device control, move this driver to use new fsl_dma_external_start() API Signed-off-by: Vinod Koul --- drivers/misc/carma/carma-fpga-program.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/misc/carma') diff --git a/drivers/misc/carma/carma-fpga-program.c b/drivers/misc/carma/carma-fpga-program.c index fd0cb8b1eefb..298f9127e697 100644 --- a/drivers/misc/carma/carma-fpga-program.c +++ b/drivers/misc/carma/carma-fpga-program.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -524,7 +525,7 @@ static noinline int fpga_program_dma(struct fpga_dev *priv) goto out_dma_unmap; } - ret = chan->device->device_control(chan, FSLDMA_EXTERNAL_START, 1); + ret = fsl_dma_external_start(chan, 1) if (ret) { dev_err(priv->dev, "DMA external control setup failed\n"); goto out_dma_unmap; -- cgit v1.2.3-59-g8ed1b