DMA Engine development
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: alsa-devel@alsa-project.org, Xiubo Li <Xiubo.Lee@gmail.com>,
	Fabio Estevam <festevam@gmail.com>,
	Shengjiu Wang <shengjiu.wang@gmail.com>,
	kernel@pengutronix.de, NXP Linux Team <linux-imx@nxp.com>,
	dmaengine@vger.kernel.org
Subject: Re: [PATCH v2 10/19] dma: imx-sdma: Add multi fifo support
Date: Thu, 7 Apr 2022 12:52:23 +0530	[thread overview]
Message-ID: <Yk6RLyQg/RzuZFhg@matsya> (raw)
In-Reply-To: <20220331075828.GE4012@pengutronix.de>

On 31-03-22, 09:58, Sascha Hauer wrote:
> On Thu, Mar 31, 2022 at 12:24:46PM +0530, Vinod Koul wrote:
> > On 31-03-22, 08:49, Sascha Hauer wrote:
> > > On Thu, Mar 31, 2022 at 10:56:09AM +0530, Vinod Koul wrote:
> > > > On 28-03-22, 13:27, Sascha Hauer wrote:
> > > > > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > > > 
> > > > it is dmaengine: xxx
> > > 
> > > Ok.
> > > 
> > > > 
> > > > Also is this patch dependent on rest of the series, if not consider
> > > > sending separately
> > > 
> > > The rest of this series indeed depends on this patch.
> > > 
> > > > 
> > > > > diff --git a/include/linux/platform_data/dma-imx.h b/include/linux/platform_data/dma-imx.h
> > > > > index 281adbb26e6bd..4a43a048e1b4d 100644
> > > > > --- a/include/linux/platform_data/dma-imx.h
> > > > > +++ b/include/linux/platform_data/dma-imx.h
> > > > > @@ -39,6 +39,7 @@ enum sdma_peripheral_type {
> > > > >  	IMX_DMATYPE_SSI_DUAL,	/* SSI Dual FIFO */
> > > > >  	IMX_DMATYPE_ASRC_SP,	/* Shared ASRC */
> > > > >  	IMX_DMATYPE_SAI,	/* SAI */
> > > > > +	IMX_DMATYPE_MULTI_SAI,	/* MULTI FIFOs For Audio */
> > > > >  };
> > > > >  
> > > > >  enum imx_dma_prio {
> > > > > @@ -65,4 +66,10 @@ static inline int imx_dma_is_general_purpose(struct dma_chan *chan)
> > > > >  		!strcmp(chan->device->dev->driver->name, "imx-dma");
> > > > >  }
> > > > >  
> > > > > +struct sdma_peripheral_config {
> > > > > +	int n_fifos_src;
> > > > > +	int n_fifos_dst;
> > > > > +	bool sw_done;
> > > > > +};
> > > > 
> > > > Not more platform data :(
> > > 
> > > I'm not sure what you are referring to as platform_data. This is not the
> > > classical platform_data that is attached to a platform_device to
> > > configure behaviour of that device. It is rather data that needs to be
> > > communicated from the clients of the SDMA engine to the SDMA engine.
> > > 
> > > I have put this into include/linux/platform_data/dma-imx.h because
> > > that's the only existing include file that is available. I could move
> > > this to a new file if you like that better.
> > 
> > Lets move to include/linux/dma/
> 
> Ok.
> 
> > 
> > > 
> > > > 
> > > > Can you explain this structure and why this is required? What do these
> > > > fields refer to..?
> > > 
> > > The reasoning for this structure is described in the commit message that
> > > I have forgotten:
> > > 
> > >     The i.MX SDMA engine can read from / write to multiple successive
> > >     hardware FIFO registers, referred to as "Multi FIFO support". This is
> > >     needed for the micfil driver and certain configurations of the SAI
> > >     driver. This patch adds support for this feature.
> > > 
> > >     The number of FIFOs to read from / write to must be communicated from
> > >     the client driver to the SDMA engine. For this the struct
> > >     dma_slave_config::peripheral_config field is used.
> > > 
> > > I can describe the individual fields of struct sdma_peripheral_config in
> > > the header file if that's your point.
> > 
> > So you need to know the number of fifo right, what does sw_done imply?
> 
> Honestly I don't know. Setting sw_done results in the DONE_SEL0 bit in
> the SDMA engine being set. This is described in the reference manual
> as:
> 
> DONE_SEL0 Select Done from SW or HW for channel 0
>           0 HW
>           1 SW
> 
> I can only assume that the signaling when a channel has transferred
> enough data (the generation of the channel done interrupt?) can either
> be done in hardware or in software in the SDMA engine. What I can tell
> for sure is that I need this bit set ;)

That does sound like a mechanism to tell that transfer is done aka
handshaking aka interrupt line.

-- 
~Vinod

  reply	other threads:[~2022-04-07  7:22 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-28 11:27 [PATCH v2 00/19] ASoC: fsl_micfil: Driver updates Sascha Hauer
2022-03-28 11:27 ` [PATCH v2 01/19] ASoC: fsl_micfil: Drop unnecessary register read Sascha Hauer
2022-03-28 11:27 ` [PATCH v2 02/19] ASoC: fsl_micfil: Drop unused " Sascha Hauer
2022-03-28 11:27 ` [PATCH v2 03/19] ASoC: fsl_micfil: drop fsl_micfil_set_mclk_rate() Sascha Hauer
2022-03-28 11:27 ` [PATCH v2 04/19] ASoC: fsl_micfil: do not define SHIFT/MASK for single bits Sascha Hauer
2022-03-28 11:27 ` [PATCH v2 05/19] ASoC: fsl_micfil: use GENMASK to define register bit fields Sascha Hauer
     [not found]   ` <CAA+D8APTMSLSCb386XvN3bu+uq3F1VK9NopJYpgumDF=TCCgEw@mail.gmail.com>
2022-04-07  7:38     ` Sascha Hauer
2022-03-28 11:27 ` [PATCH v2 06/19] ASoC: fsl_micfil: use clear/set bits Sascha Hauer
2022-03-28 11:27 ` [PATCH v2 07/19] ASoC: fsl_micfil: drop error messages from failed register accesses Sascha Hauer
2022-03-28 11:27 ` [PATCH v2 08/19] ASoC: fsl_micfil: drop unused variables Sascha Hauer
2022-03-28 11:27 ` [PATCH v2 09/19] dma: imx-sdma: error out on unsupported transfer types Sascha Hauer
2022-03-28 11:27 ` [PATCH v2 10/19] dma: imx-sdma: Add multi fifo support Sascha Hauer
2022-03-29 10:55   ` Fabio Estevam
2022-03-30  7:49     ` Sascha Hauer
2022-03-31  5:26   ` Vinod Koul
2022-03-31  6:49     ` Sascha Hauer
2022-03-31  6:54       ` Vinod Koul
2022-03-31  7:58         ` Sascha Hauer
2022-04-07  7:22           ` Vinod Koul [this message]
2022-04-01 12:01         ` Sascha Hauer
2022-04-07  7:23           ` Vinod Koul
2022-04-07  7:41             ` Sascha Hauer
2022-03-28 11:27 ` [PATCH v2 11/19] ASoC: fsl_micfil: add " Sascha Hauer
2022-03-30  7:50   ` Sascha Hauer
2022-03-28 11:27 ` [PATCH v2 12/19] ASoC: fsl_micfil: use define for OSR default value Sascha Hauer
2022-03-28 11:27 ` [PATCH v2 13/19] ASoC: fsl_micfil: Drop get_pdm_clk() Sascha Hauer
2022-03-28 11:27 ` [PATCH v2 14/19] ASoC: fsl_micfil: simplify clock setting Sascha Hauer
2022-03-28 11:27 ` [PATCH v2 15/19] ASoC: fsl_micfil: rework quality setting Sascha Hauer
2022-03-28 11:27 ` [PATCH v2 16/19] ASoC: fsl_micfil: drop unused include Sascha Hauer
2022-03-28 11:27 ` [PATCH v2 17/19] ASoC: fsl_micfil: drop only once used defines Sascha Hauer
2022-03-28 11:27 ` [PATCH v2 18/19] ASoC: fsl_micfil: drop support for undocumented property Sascha Hauer
2022-03-28 11:27 ` [PATCH v2 19/19] ASoC: fsl_micfil: fold fsl_set_clock_params() into its only user Sascha Hauer

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=Yk6RLyQg/RzuZFhg@matsya \
    --to=vkoul@kernel.org \
    --cc=Xiubo.Lee@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-imx@nxp.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shengjiu.wang@gmail.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