diff mbox

dma: pl330: Alloc dma_parms for the dma device

Message ID 1385392066-3961-1-git-send-email-lars@metafoo.de (mailing list archive)
State Accepted
Commit b714b84e2b74
Headers show

Commit Message

Lars-Peter Clausen Nov. 25, 2013, 3:07 p.m. UTC
In order to be able to set a maximum segment size for the device we need to
allocate a dma_parameters struct for the device first.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/dma/pl330.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Vinod Koul Nov. 28, 2013, 8:04 a.m. UTC | #1
On Mon, Nov 25, 2013 at 04:07:46PM +0100, Lars-Peter Clausen wrote:
> In order to be able to set a maximum segment size for the device we need to
> allocate a dma_parameters struct for the device first.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Applied, thanks

--
~Vinod
> ---
>  drivers/dma/pl330.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
> index 877d7bb..828ef21 100644
> --- a/drivers/dma/pl330.c
> +++ b/drivers/dma/pl330.c
> @@ -578,6 +578,9 @@ struct dma_pl330_dmac {
>  	/* DMA-Engine Device */
>  	struct dma_device ddma;
>  
> +	/* Holds info about sg limitations */
> +	struct device_dma_parameters dma_parms;
> +
>  	/* Pool of descriptors available for the DMAC's channels */
>  	struct list_head desc_pool;
>  	/* To protect desc_pool manipulation */
> @@ -3019,6 +3022,9 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id)
>  			"unable to register DMA to the generic DT DMA helpers\n");
>  		}
>  	}
> +
> +	adev->dev.dma_parms = &pdmac->dma_parms;
> +
>  	/*
>  	 * This is the limit for transfers with a buswidth of 1, larger
>  	 * buswidths will have larger limits.
> -- 
> 1.8.0
>
diff mbox

Patch

diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index 877d7bb..828ef21 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -578,6 +578,9 @@  struct dma_pl330_dmac {
 	/* DMA-Engine Device */
 	struct dma_device ddma;
 
+	/* Holds info about sg limitations */
+	struct device_dma_parameters dma_parms;
+
 	/* Pool of descriptors available for the DMAC's channels */
 	struct list_head desc_pool;
 	/* To protect desc_pool manipulation */
@@ -3019,6 +3022,9 @@  pl330_probe(struct amba_device *adev, const struct amba_id *id)
 			"unable to register DMA to the generic DT DMA helpers\n");
 		}
 	}
+
+	adev->dev.dma_parms = &pdmac->dma_parms;
+
 	/*
 	 * This is the limit for transfers with a buswidth of 1, larger
 	 * buswidths will have larger limits.