From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: John Madieu <john.madieu.xa@bp.renesas.com>
Cc: Mark Brown <broonie@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Magnus Damm <magnus.damm@gmail.com>,
Philipp Zabel <p.zabel@pengutronix.de>,
Claudiu Beznea <claudiu.beznea@tuxon.dev>,
Biju Das <biju.das.jz@bp.renesas.com>,
john.madieu@gmail.com, linux-sound@vger.kernel.org,
linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 06/12] ASoC: rsnd: Add RZ/G3E DMA address calculation support
Date: Fri, 10 Apr 2026 02:06:03 +0000 [thread overview]
Message-ID: <87pl47efhw.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <20260409090302.2243305-7-john.madieu.xa@bp.renesas.com>
Hi John
> RZ/G3E has different DMA register base addresses and offset
> calculations compared to R-Car platforms.
>
> Add dedicated rsnd_rzg3e_dma_addr() function with dispatch from
> rsnd_dma_addr(), following the existing per-generation pattern.
>
> Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com>
> ---
(snip)
> +struct rsnd_dma_addr {
> + dma_addr_t out_addr;
> + dma_addr_t in_addr;
> +};
> +
> +struct rsnd_dma_addr_dir {
> + struct rsnd_dma_addr capture[3];
> + struct rsnd_dma_addr playback[3];
> +};
> +
> +struct rsnd_dma_addr_map {
> + struct rsnd_dma_addr_dir src;
> + struct rsnd_dma_addr_dir ssi;
> + struct rsnd_dma_addr_dir ssiu;
> +};
> +
> +static dma_addr_t
> +rsnd_dma_addr_lookup(struct rsnd_dai_stream *io,
> + struct rsnd_mod *mod,
> + struct rsnd_priv *priv,
> + const struct rsnd_dma_addr_map *map,
> + int is_play, int is_from)
> +{
> + struct device *dev = rsnd_priv_to_dev(priv);
> + int is_ssi = !!(rsnd_io_to_mod_ssi(io) == mod) ||
> + !!(rsnd_io_to_mod_ssiu(io) == mod);
> + int use_src = !!rsnd_io_to_mod_src(io);
> + int use_cmd = !!rsnd_io_to_mod_dvc(io) ||
> + !!rsnd_io_to_mod_mix(io) ||
> + !!rsnd_io_to_mod_ctu(io);
> + int id = rsnd_mod_id(mod);
> + const struct rsnd_dma_addr_dir *dir;
> + const struct rsnd_dma_addr *addr;
> +
> + /* it shouldn't happen */
> + if (use_cmd && !use_src)
> + dev_err(dev, "DVC is selected without SRC\n");
> +
> + /* use SSIU or SSI? */
> + if (is_ssi && rsnd_ssi_use_busif(io))
> + is_ssi++;
> +
> + dev_dbg(dev, "dma%d addr : is_ssi=%d use_src=%d use_cmd=%d\n",
> + id, is_ssi, use_src, use_cmd);
> +
> + switch (is_ssi) {
> + case 2:
> + dir = &map->ssiu;
> + break;
> + case 1:
> + dir = &map->ssi;
> + break;
> + default:
> + dir = &map->src;
> + break;
> + }
> +
> + addr = is_play ? &dir->playback[use_src + use_cmd]
> + : &dir->capture[use_src + use_cmd];
> +
> + return is_from ? addr->out_addr : addr->in_addr;
> +}
Thank you for adding new struct and look function !!
It is easy to read !
But I think exising gen2 map and new lookup should be done by separated
as preparation-patch. And add new RZ/G3E feature as new-patch.
> /*
> * Common DMAC Interface
> */
> @@ -499,7 +562,16 @@ static struct rsnd_mod_ops rsnd_dmapp_ops = {
> * SSIU: 0xec541000 / 0xec100000 / 0xec100000 / 0xec400000 / 0xec400000
> * SCU : 0xec500000 / 0xec000000 / 0xec004000 / 0xec300000 / 0xec304000
> * CMD : 0xec500000 / / 0xec008000 0xec308000
> + *
> + * ex) G3E case
> + * mod / DMAC in / DMAC out / DMAC PP in / DMAC pp out
> + * SSI : 0x13C31000 / 0x13C40000 / 0x13C40000
> + * SSIU: 0x13C31000 / 0x13C40000 / 0x13C40000 / 0xEC400000 / 0xEC400000
> + * SCU : 0x13C00000 / 0x13C10000 / 0x13C14000 / 0xEC300000 / 0xEC304000
> + * CMD : 0x13C00000 / / 0x13C18000 0xEC308000
This G3E comment should go-to at rzg3e_dma_addr(), not here
> if ((id == 9) && (busif >= 4))
> - dev_err(dev, "This driver doesn't support SSI%d-%d, so far",
> - id, busif);
> + dev_err(dev,
> + "This driver doesn't support SSI%d-%d, so far", id, busif);
What was changed ?
Thank you for your help !!
Best regards
---
Kuninori Morimoto
next prev parent reply other threads:[~2026-04-10 2:06 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-09 9:02 [PATCH v4 00/12] ASoC: rsnd: Add RZ/G3E audio driver support John Madieu
2026-04-09 9:02 ` [PATCH v4 01/12] ASoC: dt-bindings: renesas,rsnd: Split into generic and SoC-specific parts John Madieu
2026-04-10 7:05 ` Krzysztof Kozlowski
2026-04-09 9:02 ` [PATCH v4 02/12] ASoC: dt-bindings: Add RZ/G3E (R9A09G047) sound binding John Madieu
2026-04-10 7:10 ` Krzysztof Kozlowski
2026-04-15 10:43 ` John Madieu
2026-04-09 9:02 ` [PATCH v4 03/12] ASoC: rsnd: Add reset controller support to rsnd_mod John Madieu
2026-04-09 9:02 ` [PATCH v4 04/12] ASoC: rsnd: Add RZ/G3E SoC probing and register map John Madieu
2026-04-10 1:54 ` Kuninori Morimoto
2026-04-09 9:02 ` [PATCH v4 05/12] ASoC: rsnd: Add audmacpp clock and reset support for RZ/G3E John Madieu
2026-04-10 1:56 ` Kuninori Morimoto
2026-04-09 9:02 ` [PATCH v4 06/12] ASoC: rsnd: Add RZ/G3E DMA address calculation support John Madieu
2026-04-10 2:06 ` Kuninori Morimoto [this message]
2026-04-09 9:02 ` [PATCH v4 07/12] ASoC: rsnd: ssui: Add RZ/G3E SSIU BUSIF support John Madieu
2026-04-09 9:02 ` [PATCH v4 08/12] ASoC: rsnd: Add SSI reset support for RZ/G3E platforms John Madieu
2026-04-09 9:02 ` [PATCH v4 09/12] ASoC: rsnd: Add ADG reset support for RZ/G3E John Madieu
2026-04-09 9:02 ` [PATCH v4 10/12] ASoC: rsnd: adg: Add per-SSI ADG and SSIF supply clock management John Madieu
2026-04-09 9:03 ` [PATCH v4 11/12] ASoC: rsnd: src: Add SRC reset and clock support for RZ/G3E John Madieu
2026-04-09 9:03 ` [PATCH v4 12/12] ASoC: rsnd: Add system suspend/resume support John Madieu
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=87pl47efhw.wl-kuninori.morimoto.gx@renesas.com \
--to=kuninori.morimoto.gx@renesas.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=broonie@kernel.org \
--cc=claudiu.beznea@tuxon.dev \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=john.madieu.xa@bp.renesas.com \
--cc=john.madieu@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=p.zabel@pengutronix.de \
--cc=perex@perex.cz \
--cc=robh@kernel.org \
--cc=tiwai@suse.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