LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] dmaengine: bam-dma: fill slave directions bit mask
@ 2015-03-04 15:25 Stanimir Varbanov
  2015-03-04 16:02 ` Vinod Koul
  2015-03-04 19:23 ` Stephen Boyd
  0 siblings, 2 replies; 5+ messages in thread
From: Stanimir Varbanov @ 2015-03-04 15:25 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Dan Williams, dmaengine, linux-kernel, linux-arm-msm, Stanimir Varbanov

This will avoid warning during async device registration.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
---
 drivers/dma/qcom_bam_dma.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/dma/qcom_bam_dma.c b/drivers/dma/qcom_bam_dma.c
index c3113e3..cc9e5ee 100644
--- a/drivers/dma/qcom_bam_dma.c
+++ b/drivers/dma/qcom_bam_dma.c
@@ -1143,6 +1143,7 @@ static int bam_dma_probe(struct platform_device *pdev)
 	dma_cap_set(DMA_SLAVE, bdev->common.cap_mask);
 
 	/* initialize dmaengine apis */
+	bdev->common.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
 	bdev->common.device_alloc_chan_resources = bam_alloc_chan;
 	bdev->common.device_free_chan_resources = bam_free_chan;
 	bdev->common.device_prep_slave_sg = bam_prep_slave_sg;
-- 
1.7.0.4


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] dmaengine: bam-dma: fill slave directions bit mask
  2015-03-04 15:25 [PATCH] dmaengine: bam-dma: fill slave directions bit mask Stanimir Varbanov
@ 2015-03-04 16:02 ` Vinod Koul
  2015-03-04 19:44   ` Andy Gross
  2015-03-04 19:23 ` Stephen Boyd
  1 sibling, 1 reply; 5+ messages in thread
From: Vinod Koul @ 2015-03-04 16:02 UTC (permalink / raw)
  To: Stanimir Varbanov; +Cc: Dan Williams, dmaengine, linux-kernel, linux-arm-msm

On Wed, Mar 04, 2015 at 05:25:10PM +0200, Stanimir Varbanov wrote:
> This will avoid warning during async device registration.
> 
> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
> ---
>  drivers/dma/qcom_bam_dma.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/dma/qcom_bam_dma.c b/drivers/dma/qcom_bam_dma.c
> index c3113e3..cc9e5ee 100644
> --- a/drivers/dma/qcom_bam_dma.c
> +++ b/drivers/dma/qcom_bam_dma.c
> @@ -1143,6 +1143,7 @@ static int bam_dma_probe(struct platform_device *pdev)
>  	dma_cap_set(DMA_SLAVE, bdev->common.cap_mask);
>  
>  	/* initialize dmaengine apis */
> +	bdev->common.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
>  	bdev->common.device_alloc_chan_resources = bam_alloc_chan;
>  	bdev->common.device_free_chan_resources = bam_free_chan;
>  	bdev->common.device_prep_slave_sg = bam_prep_slave_sg;
You need to fill other fields, src/dstn_addr_widths and
residue_granularity...

-- 
~Vinod


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] dmaengine: bam-dma: fill slave directions bit mask
  2015-03-04 15:25 [PATCH] dmaengine: bam-dma: fill slave directions bit mask Stanimir Varbanov
  2015-03-04 16:02 ` Vinod Koul
@ 2015-03-04 19:23 ` Stephen Boyd
  1 sibling, 0 replies; 5+ messages in thread
From: Stephen Boyd @ 2015-03-04 19:23 UTC (permalink / raw)
  To: Stanimir Varbanov, Vinod Koul
  Cc: Dan Williams, dmaengine, linux-kernel, linux-arm-msm

On 03/04/15 07:25, Stanimir Varbanov wrote:
> This will avoid warning during async device registration.
>
> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
> ---

Can you please put the warning in the commit log? Also, does this need a
Fixes: tag?

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] dmaengine: bam-dma: fill slave directions bit mask
  2015-03-04 16:02 ` Vinod Koul
@ 2015-03-04 19:44   ` Andy Gross
  2015-03-05  9:44     ` Stanimir Varbanov
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Gross @ 2015-03-04 19:44 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Stanimir Varbanov, Dan Williams, dmaengine, linux-kernel, linux-arm-msm

On Wed, Mar 04, 2015 at 09:32:13PM +0530, Vinod Koul wrote:
> On Wed, Mar 04, 2015 at 05:25:10PM +0200, Stanimir Varbanov wrote:
> > This will avoid warning during async device registration.
> > 
> > Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
> > ---
> >  drivers/dma/qcom_bam_dma.c |    1 +
> >  1 files changed, 1 insertions(+), 0 deletions(-)
> > 
> > diff --git a/drivers/dma/qcom_bam_dma.c b/drivers/dma/qcom_bam_dma.c
> > index c3113e3..cc9e5ee 100644
> > --- a/drivers/dma/qcom_bam_dma.c
> > +++ b/drivers/dma/qcom_bam_dma.c
> > @@ -1143,6 +1143,7 @@ static int bam_dma_probe(struct platform_device *pdev)
> >  	dma_cap_set(DMA_SLAVE, bdev->common.cap_mask);
> >  
> >  	/* initialize dmaengine apis */
> > +	bdev->common.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
> >  	bdev->common.device_alloc_chan_resources = bam_alloc_chan;
> >  	bdev->common.device_free_chan_resources = bam_free_chan;
> >  	bdev->common.device_prep_slave_sg = bam_prep_slave_sg;
> You need to fill other fields, src/dstn_addr_widths and
> residue_granularity...

Add segment granularity for BAM, as we can read the current completed segment.
bdev->common.residue_granularity = DMA_RESIDUE_GRANULARITY_SEGMENT;

Use DMA_SLAVE_BUSWIDTH_4_BYTES for the src/dst addr width:
bdev->common.src_addr_widths = DMA_SLAVE_BUSWIDTH_4_BYTES;
bdev->common.dst_addr_widths = DMA_SLAVE_BUSWIDTH_4_BYTES;

-- 
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] dmaengine: bam-dma: fill slave directions bit mask
  2015-03-04 19:44   ` Andy Gross
@ 2015-03-05  9:44     ` Stanimir Varbanov
  0 siblings, 0 replies; 5+ messages in thread
From: Stanimir Varbanov @ 2015-03-05  9:44 UTC (permalink / raw)
  To: Andy Gross
  Cc: Vinod Koul, Stanimir Varbanov, Dan Williams, dmaengine,
	linux-kernel, linux-arm-msm

On 03/04/2015 09:44 PM, Andy Gross wrote:
> On Wed, Mar 04, 2015 at 09:32:13PM +0530, Vinod Koul wrote:
>> On Wed, Mar 04, 2015 at 05:25:10PM +0200, Stanimir Varbanov wrote:
>>> This will avoid warning during async device registration.
>>>
>>> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
>>> ---
>>>  drivers/dma/qcom_bam_dma.c |    1 +
>>>  1 files changed, 1 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/drivers/dma/qcom_bam_dma.c b/drivers/dma/qcom_bam_dma.c
>>> index c3113e3..cc9e5ee 100644
>>> --- a/drivers/dma/qcom_bam_dma.c
>>> +++ b/drivers/dma/qcom_bam_dma.c
>>> @@ -1143,6 +1143,7 @@ static int bam_dma_probe(struct platform_device *pdev)
>>>  	dma_cap_set(DMA_SLAVE, bdev->common.cap_mask);
>>>  
>>>  	/* initialize dmaengine apis */
>>> +	bdev->common.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
>>>  	bdev->common.device_alloc_chan_resources = bam_alloc_chan;
>>>  	bdev->common.device_free_chan_resources = bam_free_chan;
>>>  	bdev->common.device_prep_slave_sg = bam_prep_slave_sg;
>> You need to fill other fields, src/dstn_addr_widths and
>> residue_granularity...
> 
> Add segment granularity for BAM, as we can read the current completed segment.
> bdev->common.residue_granularity = DMA_RESIDUE_GRANULARITY_SEGMENT;
> 
> Use DMA_SLAVE_BUSWIDTH_4_BYTES for the src/dst addr width:
> bdev->common.src_addr_widths = DMA_SLAVE_BUSWIDTH_4_BYTES;
> bdev->common.dst_addr_widths = DMA_SLAVE_BUSWIDTH_4_BYTES;
> 

Thanks Andy, will add those fields too.

-- 
regards,
Stan

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-03-05  9:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-04 15:25 [PATCH] dmaengine: bam-dma: fill slave directions bit mask Stanimir Varbanov
2015-03-04 16:02 ` Vinod Koul
2015-03-04 19:44   ` Andy Gross
2015-03-05  9:44     ` Stanimir Varbanov
2015-03-04 19:23 ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).