mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: Vivek Gautam <vivek.gautam@arm.com>
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
	robin.murphy@arm.com
Subject: Re: [PATCH] dmaengine: pl330: Set DMA_INTERRUPT capability and add related callback
Date: Wed, 29 Jun 2022 16:18:17 +0530	[thread overview]
Message-ID: <Yrwt8QzEFM6W0xrc@matsya> (raw)
In-Reply-To: <20220629093003.19440-1-vivek.gautam@arm.com>

On 29-06-22, 15:00, Vivek Gautam wrote:
> With the verification for DMA_INTERRUPT capability added to the dmatest
> module, the dmatest fails to start for various channels of pl330 dma
> controller. So, set the DMA_INTERRUPT capability and add the required
> callback method to set the transaction descriptor flags.

Are you sire you want that? See 646728dff254 in linux-next

Thanks

> 
> Signed-off-by: Vivek Gautam <vivek.gautam@arm.com>
> ---
>  drivers/dma/pl330.c | 24 ++++++++++++++++++++
>  1 file changed, 24 insertions(+)
> 
> diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
> index 858400e42ec0..b80e48f0970b 100644
> --- a/drivers/dma/pl330.c
> +++ b/drivers/dma/pl330.c
> @@ -2757,6 +2757,28 @@ static struct dma_async_tx_descriptor *pl330_prep_dma_cyclic(
>  	return &desc->txd;
>  }
>  
> +static struct dma_async_tx_descriptor *
> +pl330_dma_prep_interrupt(struct dma_chan *chan, unsigned long flags)
> +{
> +	struct dma_pl330_chan *pch = to_pchan(chan);
> +	struct dma_pl330_desc *desc;
> +
> +	if (unlikely(!pch))
> +		return NULL;
> +
> +	desc = pl330_get_desc(pch);
> +	if (!desc) {
> +		dev_err(pch->dmac->ddma.dev, "%s:%d Unable to fetch desc\n",
> +			__func__, __LINE__);
> +		return NULL;
> +	}
> +
> +	/* Set the flags that are passed downstream */
> +	desc->txd.flags = flags;
> +
> +	return &desc->txd;
> +}
> +
>  static struct dma_async_tx_descriptor *
>  pl330_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dst,
>  		dma_addr_t src, size_t len, unsigned long flags)
> @@ -3111,6 +3133,7 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id)
>  	}
>  
>  	dma_cap_set(DMA_MEMCPY, pd->cap_mask);
> +	dma_cap_set(DMA_INTERRUPT, pd->cap_mask);
>  	if (pcfg->num_peri) {
>  		dma_cap_set(DMA_SLAVE, pd->cap_mask);
>  		dma_cap_set(DMA_CYCLIC, pd->cap_mask);
> @@ -3121,6 +3144,7 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id)
>  	pd->device_free_chan_resources = pl330_free_chan_resources;
>  	pd->device_prep_dma_memcpy = pl330_prep_dma_memcpy;
>  	pd->device_prep_dma_cyclic = pl330_prep_dma_cyclic;
> +	pd->device_prep_dma_interrupt = pl330_dma_prep_interrupt;
>  	pd->device_tx_status = pl330_tx_status;
>  	pd->device_prep_slave_sg = pl330_prep_slave_sg;
>  	pd->device_config = pl330_config;
> -- 
> 2.17.1

-- 
~Vinod

  reply	other threads:[~2022-06-29 10:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-29  9:30 Vivek Gautam
2022-06-29 10:48 ` Vinod Koul [this message]
2022-06-30 10:50   ` Vivek Kumar Gautam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yrwt8QzEFM6W0xrc@matsya \
    --to=vkoul@kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=vivek.gautam@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®