• Kuninori Morimoto's avatar
    ASoC: rsnd: cleanup regmap table · 35aaed1b
    Kuninori Morimoto authored
    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: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
    Tested-by: default avatarKhanh Le <khanh.le.xr@renesas.com>
    Link: https://msgid.link/r/871q7obiyt.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
    35aaed1b
gen.c 14.8 KB