diff mbox series

[10/15] ata: pata_pxa: remove the dmaengine compat need

Message ID 20180402142656.26815-11-robert.jarzmik@free.fr
State Not Applicable
Delegated to: David Miller
Headers show
Series ARM: pxa: switch to DMA slave maps | expand

Commit Message

Robert Jarzmik April 2, 2018, 2:26 p.m. UTC
As the pxa architecture switched towards the dmaengine slave map, the
old compatibility mechanism to acquire the dma requestor line number and
priority are not needed anymore.

This patch simplifies the dma resource acquisition, using the more
generic function dma_request_slave_channel().

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
---
 drivers/ata/pata_pxa.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

Comments

Robert Jarzmik April 21, 2018, 7:32 p.m. UTC | #1
Robert Jarzmik <robert.jarzmik@free.fr> writes:

> As the pxa architecture switched towards the dmaengine slave map, the
> old compatibility mechanism to acquire the dma requestor line number and
> priority are not needed anymore.
>
> This patch simplifies the dma resource acquisition, using the more
> generic function dma_request_slave_channel().
>
> Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>

Bartlomiej, could I have your ack please ?

Cheers.

--
Robert

PS: The submitted patch
> ---
>  drivers/ata/pata_pxa.c | 10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/drivers/ata/pata_pxa.c b/drivers/ata/pata_pxa.c
> index f6c46e9a4dc0..e8b6a2e464c9 100644
> --- a/drivers/ata/pata_pxa.c
> +++ b/drivers/ata/pata_pxa.c
> @@ -25,7 +25,6 @@
>  #include <linux/libata.h>
>  #include <linux/platform_device.h>
>  #include <linux/dmaengine.h>
> -#include <linux/dma/pxa-dma.h>
>  #include <linux/gpio.h>
>  #include <linux/slab.h>
>  #include <linux/completion.h>
> @@ -180,8 +179,6 @@ static int pxa_ata_probe(struct platform_device *pdev)
>  	struct resource *irq_res;
>  	struct pata_pxa_pdata *pdata = dev_get_platdata(&pdev->dev);
>  	struct dma_slave_config	config;
> -	dma_cap_mask_t mask;
> -	struct pxad_param param;
>  	int ret = 0;
>  
>  	/*
> @@ -278,10 +275,6 @@ static int pxa_ata_probe(struct platform_device *pdev)
>  
>  	ap->private_data = data;
>  
> -	dma_cap_zero(mask);
> -	dma_cap_set(DMA_SLAVE, mask);
> -	param.prio = PXAD_PRIO_LOWEST;
> -	param.drcmr = pdata->dma_dreq;
>  	memset(&config, 0, sizeof(config));
>  	config.src_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
>  	config.dst_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
> @@ -294,8 +287,7 @@ static int pxa_ata_probe(struct platform_device *pdev)
>  	 * Request the DMA channel
>  	 */
>  	data->dma_chan =
> -		dma_request_slave_channel_compat(mask, pxad_filter_fn,
> -						 &param, &pdev->dev, "data");
> +		dma_request_slave_channel(&pdev->dev, "data");
>  	if (!data->dma_chan)
>  		return -EBUSY;
>  	ret = dmaengine_slave_config(data->dma_chan, &config);
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Bartlomiej Zolnierkiewicz April 24, 2018, 11:04 a.m. UTC | #2
On Saturday, April 21, 2018 09:32:11 PM Robert Jarzmik wrote:
> Robert Jarzmik <robert.jarzmik@free.fr> writes:
> 
> > As the pxa architecture switched towards the dmaengine slave map, the
> > old compatibility mechanism to acquire the dma requestor line number and
> > priority are not needed anymore.
> >
> > This patch simplifies the dma resource acquisition, using the more
> > generic function dma_request_slave_channel().
> >
> > Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
> 
> Bartlomiej, could I have your ack please ?

Sure.

Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox series

Patch

diff --git a/drivers/ata/pata_pxa.c b/drivers/ata/pata_pxa.c
index f6c46e9a4dc0..e8b6a2e464c9 100644
--- a/drivers/ata/pata_pxa.c
+++ b/drivers/ata/pata_pxa.c
@@ -25,7 +25,6 @@ 
 #include <linux/libata.h>
 #include <linux/platform_device.h>
 #include <linux/dmaengine.h>
-#include <linux/dma/pxa-dma.h>
 #include <linux/gpio.h>
 #include <linux/slab.h>
 #include <linux/completion.h>
@@ -180,8 +179,6 @@  static int pxa_ata_probe(struct platform_device *pdev)
 	struct resource *irq_res;
 	struct pata_pxa_pdata *pdata = dev_get_platdata(&pdev->dev);
 	struct dma_slave_config	config;
-	dma_cap_mask_t mask;
-	struct pxad_param param;
 	int ret = 0;
 
 	/*
@@ -278,10 +275,6 @@  static int pxa_ata_probe(struct platform_device *pdev)
 
 	ap->private_data = data;
 
-	dma_cap_zero(mask);
-	dma_cap_set(DMA_SLAVE, mask);
-	param.prio = PXAD_PRIO_LOWEST;
-	param.drcmr = pdata->dma_dreq;
 	memset(&config, 0, sizeof(config));
 	config.src_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
 	config.dst_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
@@ -294,8 +287,7 @@  static int pxa_ata_probe(struct platform_device *pdev)
 	 * Request the DMA channel
 	 */
 	data->dma_chan =
-		dma_request_slave_channel_compat(mask, pxad_filter_fn,
-						 &param, &pdev->dev, "data");
+		dma_request_slave_channel(&pdev->dev, "data");
 	if (!data->dma_chan)
 		return -EBUSY;
 	ret = dmaengine_slave_config(data->dma_chan, &config);