summaryrefslogtreecommitdiffstats
path: root/sound/soc/sh/rcar/gen.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2024-04-02 04:24:01 +0200
committerMark Brown <broonie@kernel.org>2024-04-02 16:55:04 +0200
commit6e4e5432942a57f4c3e6a5a4a97a4d1a164dca61 (patch)
treeedd84a7787d5a15ba80f7151bc03263e77871d3d /sound/soc/sh/rcar/gen.c
parentASoC: rsnd: cleanup regmap table (diff)
downloadlinux-6e4e5432942a57f4c3e6a5a4a97a4d1a164dca61.tar.xz
linux-6e4e5432942a57f4c3e6a5a4a97a4d1a164dca61.zip
ASoC: rsnd: don't get resource from ID
All SoC has reg-name, no need to support getting resource from ID any more. Remove it. To get physical address for DMA settings, it still need to know the index, but it is no longer fixed. This patch tidyup it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://msgid.link/r/87zfuca4e6.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sh/rcar/gen.c')
-rw-r--r--sound/soc/sh/rcar/gen.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c
index e566712e5234..d1f20cde66be 100644
--- a/sound/soc/sh/rcar/gen.c
+++ b/sound/soc/sh/rcar/gen.c
@@ -178,8 +178,6 @@ static int _rsnd_gen_regmap_init(struct rsnd_priv *priv,
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, name);
if (!res)
- res = platform_get_resource(pdev, IORESOURCE_MEM, reg_id);
- if (!res)
return -ENODEV;
base = devm_ioremap_resource(dev, res);
@@ -425,10 +423,10 @@ static int rsnd_gen4_probe(struct rsnd_priv *priv)
* ssiu: SSIU0
* ssi : SSI0
*/
- int ret_ssiu = rsnd_gen_regmap_init(priv, 1, RSND_GEN4_SSIU, "ssiu", conf_common_ssiu);
- int ret_ssi = rsnd_gen_regmap_init(priv, 1, RSND_GEN4_SSI, "ssi", conf_common_ssi);
- int ret_adg = rsnd_gen_regmap_init(priv, 1, RSND_GEN4_ADG, "adg", conf_common_adg);
- int ret_sdmc = rsnd_gen_regmap_init(priv, 1, RSND_GEN4_SDMC, "sdmc", conf_null);
+ int ret_ssiu = rsnd_gen_regmap_init(priv, 1, RSND_BASE_SSIU, "ssiu", conf_common_ssiu);
+ int ret_ssi = rsnd_gen_regmap_init(priv, 1, RSND_BASE_SSI, "ssi", conf_common_ssi);
+ int ret_adg = rsnd_gen_regmap_init(priv, 1, RSND_BASE_ADG, "adg", conf_common_adg);
+ int ret_sdmc = rsnd_gen_regmap_init(priv, 1, RSND_BASE_SDMC, "sdmc", conf_null);
return ret_adg | ret_ssiu | ret_ssi | ret_sdmc;
}
@@ -443,10 +441,10 @@ static int rsnd_gen2_probe(struct rsnd_priv *priv)
* ssiu: SSIU0 - SSIU9
* scu : SRC0 - SRC9 etc
*/
- int ret_ssi = rsnd_gen_regmap_init(priv, 10, RSND_GEN2_SSI, "ssi", conf_common_ssi);
- int ret_ssiu = rsnd_gen_regmap_init(priv, 10, RSND_GEN2_SSIU, "ssiu", conf_common_ssiu);
- int ret_scu = rsnd_gen_regmap_init(priv, 10, RSND_GEN2_SCU, "scu", conf_common_scu);
- int ret_adg = rsnd_gen_regmap_init(priv, 1, RSND_GEN2_ADG, "adg", conf_common_adg);
+ int ret_ssi = rsnd_gen_regmap_init(priv, 10, RSND_BASE_SSI, "ssi", conf_common_ssi);
+ int ret_ssiu = rsnd_gen_regmap_init(priv, 10, RSND_BASE_SSIU, "ssiu", conf_common_ssiu);
+ int ret_scu = rsnd_gen_regmap_init(priv, 10, RSND_BASE_SCU, "scu", conf_common_scu);
+ int ret_adg = rsnd_gen_regmap_init(priv, 1, RSND_BASE_ADG, "adg", conf_common_adg);
return ret_ssi | ret_ssiu | ret_scu | ret_adg;
}
@@ -460,8 +458,8 @@ static int rsnd_gen1_probe(struct rsnd_priv *priv)
/*
* ssi : SSI0 - SSI8
*/
- int ret_ssi = rsnd_gen_regmap_init(priv, 9, RSND_GEN1_SSI, "ssi", conf_common_ssi);
- int ret_adg = rsnd_gen_regmap_init(priv, 1, RSND_GEN1_ADG, "adg", conf_common_adg);
+ int ret_ssi = rsnd_gen_regmap_init(priv, 9, RSND_BASE_SSI, "ssi", conf_common_ssi);
+ int ret_adg = rsnd_gen_regmap_init(priv, 1, RSND_BASE_ADG, "adg", conf_common_adg);
return ret_adg | ret_ssi;
}