Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1544164

Re: [PATCH 2/5] dmaengine: Add support for custom data mapping

From Vinod Koul <vinod.koul@intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/5] dmaengine: Add support for custom data mapping
Date 2016-12-18 17:30 +0100
Message-ID <sPMvv-2r2-7@gated-at.bofh.it> (permalink)
References <sOAZr-4bS-3@gated-at.bofh.it> <sOAZr-4bS-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 2/5] dmaengine: Add support for custom data mapping Abhishek Sahu <absahu@codeaurora.org> - 2016-12-15 11:00 +0100
  Re: [PATCH 2/5] dmaengine: Add support for custom data mapping Vinod Koul <vinod.koul@intel.com> - 2016-12-18 17:30 +0100
    Re: [PATCH 2/5] dmaengine: Add support for custom data mapping Andy Gross <andy.gross@linaro.org> - 2016-12-19 06:10 +0100
      Re: [PATCH 2/5] dmaengine: Add support for custom data mapping Vinod Koul <vinod.koul@intel.com> - 2016-12-19 16:50 +0100
        Re: [PATCH 2/5] dmaengine: Add support for custom data mapping Andy Gross <andy.gross@linaro.org> - 2016-12-19 19:00 +0100
          Re: [PATCH 2/5] dmaengine: Add support for custom data mapping Abhishek Sahu <absahu@codeaurora.org> - 2016-12-20 20:30 +0100
            Re: [PATCH 2/5] dmaengine: Add support for custom data mapping Andy Gross <andy.gross@linaro.org> - 2016-12-20 21:30 +0100
              Re: [PATCH 2/5] dmaengine: Add support for custom data mapping Abhishek Sahu <absahu@codeaurora.org> - 2016-12-21 20:40 +0100
                Re: [PATCH 2/5] dmaengine: Add support for custom data mapping Andy Gross <andy.gross@linaro.org> - 2016-12-29 19:00 +0100
                Re: [PATCH 2/5] dmaengine: Add support for custom data mapping Abhishek Sahu <absahu@codeaurora.org> - 2017-01-02 15:30 +0100
                Re: [PATCH 2/5] dmaengine: Add support for custom data mapping Andy Gross <andy.gross@linaro.org> - 2017-01-02 17:20 +0100

csiph-web