ASoC: rsnd: cleanup regmap table
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 2 Apr 2024 02:23:54 +0000 (02:23 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 2 Apr 2024 14:55:03 +0000 (15:55 +0100)
commit35aaed1bc3c32c52b7fda525cd7bd19998035518
tree5ed8c78387c3b5f8a69103a7b72169cc10800c4c
parent2ae143fb3a057ad7d0a5f833386116441bfd5172
ASoC: rsnd: cleanup regmap table

R-Car Sound is using almost same register mapping on each generation,
therefore we can share it. Here indicates some memo/comments.

SSI/SSIU/SCU have multi channels (SSI0 - SSI9 etc), but ADG is single,
so, we don't need to have multi channel settings for it

- rsnd_gen_regmap_init(..., 10, ..ADG, ...);
+ rsnd_gen_regmap_init(...,  1, ..ADG, ...);

Gen4 added new SSI_BUSIF, but it is not used

Gen4 calls rsnd_gen_regmap_init() for SDMC, but the address is calculated
by rsnd_gen4_dma_addr(). It needs physical address, but other info are
not needed. use NULL conf for it.

- rsnd_gen_regmap_init(..., 10, ..SDMC, conf_sdmc);
+ rsnd_gen_regmap_init(...,  1, ..SDMC, conf_null);

Gen4 have only SSI0/SSIU0, we don't need to have multi channel settings.

- rsnd_gen_regmap_init(..., 10, ..SSI, ...);
+ rsnd_gen_regmap_init(...,  1, ..SSI, ...);

SSI_MODE2 address is different between Gen2/3 and Gen4, but it is not
used on Gen4. Thus we can share same regmap table.

Gen2/3 : 0x808
Gen4   : 0xa0c

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Khanh Le <khanh.le.xr@renesas.com>
Link: https://msgid.link/r/871q7obiyt.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sh/rcar/gen.c
sound/soc/sh/rcar/rsnd.h