From: Sascha Hauer <s.hauer@pengutronix.de>
To: Shengjiu Wang <shengjiu.wang@gmail.com>
Cc: alsa-devel@alsa-project.org, Xiubo Li <Xiubo.Lee@gmail.com>,
Fabio Estevam <festevam@gmail.com>,
Sascha Hauer <kernel@pengutronix.de>,
Vinod Koul <vkoul@kernel.org>, NXP Linux Team <linux-imx@nxp.com>,
dmaengine@vger.kernel.org
Subject: Re: [PATCH 10/19] dma: imx-sdma: Add multi fifo support
Date: Fri, 18 Mar 2022 09:04:36 +0100 [thread overview]
Message-ID: <20220318080436.GA12181@pengutronix.de> (raw)
In-Reply-To: <CAA+D8AM5bm3Hncrf0=xdPNpC_rz_yMbokN6J-8z4tHi7-==jgA@mail.gmail.com>
On Fri, Mar 18, 2022 at 01:42:51PM +0800, Shengjiu Wang wrote:
> Hi
> On Thu, Mar 17, 2022 at 4:28 PM Sascha Hauer <[1]s.hauer@pengutronix.de>
> wrote:
>
> Signed-off-by: Sascha Hauer <[2]s.hauer@pengutronix.de>
> ---
> drivers/dma/imx-sdma.c | 54 +++++++++++++++++++++++++++
> include/linux/platform_data/dma-imx.h | 7 ++++
> 2 files changed, 61 insertions(+)
>
> diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
> index 1038f6bc7f846..21e1cec2ffde9 100644
> --- a/drivers/dma/imx-sdma.c
> +++ b/drivers/dma/imx-sdma.c
> @@ -14,6 +14,7 @@
> #include <linux/iopoll.h>
> #include <linux/module.h>
> #include <linux/types.h>
> +#include <linux/bitfield.h>
> #include <linux/bitops.h>
> #include <linux/mm.h>
> #include <linux/interrupt.h>
> @@ -73,6 +74,7 @@
> #define SDMA_CHNENBL0_IMX35 0x200
> #define SDMA_CHNENBL0_IMX31 0x080
> #define SDMA_CHNPRI_0 0x100
> +#define SDMA_DONE0_CONFIG 0x1000
>
> /*
> * Buffer descriptor status values.
> @@ -180,6 +182,12 @@
> BIT(DMA_MEM_TO_DEV) | \
> BIT(DMA_DEV_TO_DEV))
>
> +#define SDMA_WATERMARK_LEVEL_N_FIFOS GENMASK(15, 12)
> +#define SDMA_WATERMARK_LEVEL_SW_DONE BIT(23)
> +
> +#define SDMA_DONE0_CONFIG_DONE_SEL BIT(7)
> +#define SDMA_DONE0_CONFIG_DONE_DIS BIT(6)
> +
> /**
> * struct sdma_script_start_addrs - SDMA script start pointers
> *
> @@ -441,6 +449,11 @@ struct sdma_channel {
> struct work_struct terminate_worker;
> struct list_head terminated;
> bool is_ram_script;
> + unsigned int n_fifos;
> + unsigned int n_fifos_src;
> + unsigned int n_fifos_dst;
> + bool sw_done;
> + u32 sw_done_sel;
>
> "sw_done_sel" is not used, and may not be needed.
Ok, will drop.
> And can we just add 'struct sdma_peripheral_config *pconfig'
> to replace each item here ('n_fifos_src', 'n_fifos_dst',
> 'sw_done')?
I rather do not access the pointer to the peripheral_config outside of
sdma_config because I know nothing about the lifetime of that structure.
> the pconfig can point to the struct in dma_slave_config.
> And 'n_fifos' can be moved to locally function in
> sdma_set_watermarklevel_for_sais(), then use sdmac->direction
> to select 'n_fifos_dst' or 'n_fifos_src'.
Ok.
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2022-03-18 8:04 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-17 8:27 [PATCH 00/19] ASoC: fsl_micfil: Driver updates Sascha Hauer
2022-03-17 8:28 ` [PATCH 01/19] ASoC: fsl_micfil: Drop unnecessary register read Sascha Hauer
2022-03-17 8:28 ` [PATCH 02/19] ASoC: fsl_micfil: Drop unused " Sascha Hauer
2022-03-17 8:28 ` [PATCH 03/19] ASoC: fsl_micfil: drop fsl_micfil_set_mclk_rate() Sascha Hauer
2022-03-17 8:28 ` [PATCH 04/19] ASoC: fsl_micfil: do not define SHIFT/MASK for single bits Sascha Hauer
2022-03-17 8:28 ` [PATCH 05/19] ASoC: fsl_micfil: use GENMASK to define register bit fields Sascha Hauer
2022-03-17 17:06 ` kernel test robot
2022-03-17 8:28 ` [PATCH 06/19] ASoC: fsl_micfil: use clear/set bits Sascha Hauer
2022-03-17 8:28 ` [PATCH 07/19] ASoC: fsl_micfil: drop error messages from failed register accesses Sascha Hauer
2022-03-17 8:28 ` [PATCH 08/19] ASoC: fsl_micfil: drop unused variables Sascha Hauer
2022-03-17 8:28 ` [PATCH 09/19] dma: imx-sdma: error out on unsupported transfer types Sascha Hauer
2022-03-17 8:28 ` [PATCH 10/19] dma: imx-sdma: Add multi fifo support Sascha Hauer
[not found] ` <CAA+D8APw-OHdz4s=oy9bWZOw6kj8mD8nss3OKXsYQty52=tb2Q@mail.gmail.com>
2022-03-17 10:19 ` Sascha Hauer
[not found] ` <CAA+D8AMdTzqfEQCH4pcQE3K1P-4oo71ctiGW1DD7XJPQDcVbTg@mail.gmail.com>
2022-03-17 14:41 ` Sascha Hauer
[not found] ` <CAA+D8AM5bm3Hncrf0=xdPNpC_rz_yMbokN6J-8z4tHi7-==jgA@mail.gmail.com>
2022-03-18 8:04 ` Sascha Hauer [this message]
2022-03-17 8:28 ` [PATCH 11/19] ASoC: fsl_micfil: add " Sascha Hauer
2022-03-17 8:28 ` [PATCH 12/19] ASoC: fsl_micfil: use define for OSR default value Sascha Hauer
2022-03-17 8:28 ` [PATCH 13/19] ASoC: fsl_micfil: Drop get_pdm_clk() Sascha Hauer
2022-03-17 8:28 ` [PATCH 14/19] ASoC: fsl_micfil: simplify clock setting Sascha Hauer
2022-03-17 8:28 ` [PATCH 15/19] ASoC: fsl_micfil: rework quality setting Sascha Hauer
2022-03-17 8:28 ` [PATCH 16/19] ASoC: fsl_micfil: drop unused include Sascha Hauer
2022-03-17 8:28 ` [PATCH 17/19] ASoC: fsl_micfil: drop only once used defines Sascha Hauer
2022-03-17 8:28 ` [PATCH 18/19] ASoC: fsl_micfil: drop support for undocumented property Sascha Hauer
2022-03-17 8:28 ` [PATCH 19/19] ASoC: fsl_micfil: fold fsl_set_clock_params() into its only user Sascha Hauer
-- strict thread matches above, loose matches on Subject: below --
2022-03-17 10:18 [PATCH 10/19] dma: imx-sdma: Add multi fifo support S.J. Wang
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=20220318080436.GA12181@pengutronix.de \
--to=s.hauer@pengutronix.de \
--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=shengjiu.wang@gmail.com \
--cc=vkoul@kernel.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