Skip to content

Commit 33a3500

Browse files
John Madieubroonie
authored andcommitted
ASoC: rsnd: src: Add SRC reset support for RZ/G3E
The RZ/G3E SoC exposes a shared SCU reset controller used by all SRC modules. Acquire it once and pass it through per-instance's rsnd_mod_init() so it is wired into the rsnd_mod->rstc plumbing. devm_reset_control_get_optional_shared() returns NULL when no reset is described in DT, leaving existing R-Car generations unaffected. Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/20260525110230.4014435-17-john.madieu.xa@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 799836b commit 33a3500

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

  • sound/soc/renesas/rcar

sound/soc/renesas/rcar/src.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,7 @@ int rsnd_src_probe(struct rsnd_priv *priv)
720720
{
721721
struct device_node *node;
722722
struct device *dev = rsnd_priv_to_dev(priv);
723+
struct reset_control *rstc;
723724
struct rsnd_src_ctrl *src_ctrl;
724725
struct rsnd_src *src;
725726
struct clk *clk;
@@ -772,6 +773,16 @@ int rsnd_src_probe(struct rsnd_priv *priv)
772773
goto rsnd_src_probe_done;
773774
}
774775

776+
/*
777+
* Shared SCU reset for every SRC module; acquire once.
778+
* R-Car platforms typically don't have SRC reset controls.
779+
*/
780+
rstc = devm_reset_control_get_optional_shared(dev, "scu");
781+
if (IS_ERR(rstc)) {
782+
ret = PTR_ERR(rstc);
783+
goto rsnd_src_probe_done;
784+
}
785+
775786
i = 0;
776787
for_each_child_of_node_scoped(node, np) {
777788
if (!of_device_is_available(np))
@@ -798,7 +809,7 @@ int rsnd_src_probe(struct rsnd_priv *priv)
798809
}
799810

800811
ret = rsnd_mod_init(priv, rsnd_mod_get(src),
801-
&rsnd_src_ops, clk, NULL, RSND_MOD_SRC, i);
812+
&rsnd_src_ops, clk, rstc, RSND_MOD_SRC, i);
802813
if (ret)
803814
goto rsnd_src_probe_done;
804815

0 commit comments

Comments
 (0)