Re: [PATCH] dmaengine: bam-dma: fill slave directions bit mask

2015-03-05 Thread Stanimir Varbanov
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 
>>> ---
>>>  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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] dmaengine: bam-dma: fill slave directions bit mask

2015-03-05 Thread Stanimir Varbanov
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.varba...@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
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] dmaengine: bam-dma: fill slave directions bit mask

2015-03-04 Thread Andy Gross
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 
> > ---
> >  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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] dmaengine: bam-dma: fill slave directions bit mask

2015-03-04 Thread Stephen Boyd
On 03/04/15 07:25, Stanimir Varbanov wrote:
> This will avoid warning during async device registration.
>
> Signed-off-by: Stanimir Varbanov 
> ---

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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] dmaengine: bam-dma: fill slave directions bit mask

2015-03-04 Thread Vinod Koul
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 
> ---
>  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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] dmaengine: bam-dma: fill slave directions bit mask

2015-03-04 Thread Vinod Koul
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.varba...@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

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] dmaengine: bam-dma: fill slave directions bit mask

2015-03-04 Thread Stephen Boyd
On 03/04/15 07:25, Stanimir Varbanov wrote:
 This will avoid warning during async device registration.

 Signed-off-by: Stanimir Varbanov stanimir.varba...@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

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] dmaengine: bam-dma: fill slave directions bit mask

2015-03-04 Thread Andy Gross
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.varba...@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

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/