linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: Abhishek Sahu <absahu@codeaurora.org>
Cc: dan.j.williams@intel.com, andy.gross@linaro.org,
	stanimir.varbanov@linaro.org, mcgrof@suse.com,
	okaya@codeaurora.org, pramod.gurav@linaro.org, arnd@arndb.de,
	linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org,
	linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH 2/5] dmaengine: Add support for custom data mapping
Date: Sun, 18 Dec 2016 21:56:02 +0530	[thread overview]
Message-ID: <20161218162602.GR25795@localhost> (raw)
In-Reply-To: <1481795755-15302-3-git-send-email-absahu@codeaurora.org>

On Thu, Dec 15, 2016 at 03:25:52PM +0530, Abhishek Sahu wrote:
> The current DMA APIs only support SGL or data in generic format.
> The QCA BAM DMA engine data cannot be mapped with already
> available APIs due to following reasons.
> 
> 1. The QCA BAM DMA engine uses custom flags which cannot be
>    mapped with generic DMA engine flags.
> 2. Some peripheral driver like QCA QPIC NAND/LCD requires to
>    set specific flags (Like NWD, EOT) for some of the descriptors
>    in scatter gather list. The already available mapping APIs take
>    flags parameter in API itself and there is no support for
>    passing DMA specific flags for each SGL entry.
> 
> Now this patch adds the support for making the DMA descriptor from
> custom data with new DMA mapping function prep_dma_custom_mapping.
> The peripheral driver will pass the custom data in this function and
> DMA engine driver will form the descriptor according to its own
> logic. In future, this API can be used by any other DMA engine
> drivers also which are unable to do DMA mapping with already
> available API’s.
> 
> Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
> ---
>  include/linux/dmaengine.h | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
> index cc535a4..6324c1f 100644
> --- a/include/linux/dmaengine.h
> +++ b/include/linux/dmaengine.h
> @@ -692,6 +692,8 @@ struct dma_filter {
>   *	be called after period_len bytes have been transferred.
>   * @device_prep_interleaved_dma: Transfer expression in a generic way.
>   * @device_prep_dma_imm_data: DMA's 8 byte immediate data to the dst address
> + * @device_prep_dma_custom_mapping: prepares a dma operation from dma driver
> + *	specific custom data
>   * @device_config: Pushes a new configuration to a channel, return 0 or an error
>   *	code
>   * @device_pause: Pauses any transfer happening on a channel. Returns
> @@ -783,6 +785,9 @@ struct dma_device {
>  	struct dma_async_tx_descriptor *(*device_prep_dma_imm_data)(
>  		struct dma_chan *chan, dma_addr_t dst, u64 data,
>  		unsigned long flags);
> +	struct dma_async_tx_descriptor *(*device_prep_dma_custom_mapping)(
> +		struct dma_chan *chan, void *data,
> +		unsigned long flags);

This needs a discussion. Why do you need to add a new API for framework.

What are NWD and EOT flags, cna you details out the flags?

-- 
~Vinod

  reply	other threads:[~2016-12-18 16:26 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-15  9:55 [PATCH 0/5] Support for QCA BAM DMA command descriptor Abhishek Sahu
2016-12-15  9:55 ` [PATCH 1/5] dmaengine: qca: bam_dma: Add header file for bam driver Abhishek Sahu
2016-12-15  9:55 ` [PATCH 2/5] dmaengine: Add support for custom data mapping Abhishek Sahu
2016-12-18 16:26   ` Vinod Koul [this message]
2016-12-19  5:06     ` Andy Gross
2016-12-19 15:49       ` Vinod Koul
2016-12-19 17:52         ` Andy Gross
2016-12-20 19:28           ` Abhishek Sahu
2016-12-20 20:25             ` Andy Gross
2016-12-21 19:34               ` Abhishek Sahu
2016-12-29 17:54                 ` Andy Gross
2017-01-02 14:25                   ` Abhishek Sahu
2017-01-02 16:12                     ` Andy Gross
2017-01-19  5:01                       ` Vinod Koul
2017-01-19 14:13                         ` Andy Gross
2017-01-19 14:57                           ` Abhishek Sahu
2017-01-20 16:56                           ` Vinod Koul
2017-04-07 13:58                             ` Abhishek Sahu
2016-12-15  9:55 ` [PATCH 3/5] dmaengine: qca: bam_dma: Add support for bam sgl Abhishek Sahu
2016-12-15  9:55 ` [PATCH 4/5] dmaengine: qca: bam_dma: implement custom data mapping Abhishek Sahu
2016-12-15  9:55 ` [PATCH 5/5] dmaengine: qca: bam_dma: implement command descriptor Abhishek Sahu

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=20161218162602.GR25795@localhost \
    --to=vinod.koul@intel.com \
    --cc=absahu@codeaurora.org \
    --cc=andy.gross@linaro.org \
    --cc=arnd@arndb.de \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@suse.com \
    --cc=okaya@codeaurora.org \
    --cc=pramod.gurav@linaro.org \
    --cc=stanimir.varbanov@linaro.org \
    /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;
as well as URLs for NNTP newsgroup(s).