Commit bd9a603f authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: rsnd: ctu: add rsnd_mix_activation()

Based on datasheet
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 355cb84f
...@@ -24,6 +24,13 @@ struct rsnd_ctu { ...@@ -24,6 +24,13 @@ struct rsnd_ctu {
i++) i++)
#define rsnd_ctu_get(priv, id) ((struct rsnd_ctu *)(priv->ctu) + id) #define rsnd_ctu_get(priv, id) ((struct rsnd_ctu *)(priv->ctu) + id)
static void rsnd_ctu_activation(struct rsnd_mod *mod)
{
rsnd_mod_write(mod, CTU_SWRSR, 0);
rsnd_mod_write(mod, CTU_SWRSR, 1);
}
#define rsnd_ctu_initialize_lock(mod) __rsnd_ctu_initialize_lock(mod, 1) #define rsnd_ctu_initialize_lock(mod) __rsnd_ctu_initialize_lock(mod, 1)
#define rsnd_ctu_initialize_unlock(mod) __rsnd_ctu_initialize_lock(mod, 0) #define rsnd_ctu_initialize_unlock(mod) __rsnd_ctu_initialize_lock(mod, 0)
static void __rsnd_ctu_initialize_lock(struct rsnd_mod *mod, u32 enable) static void __rsnd_ctu_initialize_lock(struct rsnd_mod *mod, u32 enable)
...@@ -44,6 +51,8 @@ static int rsnd_ctu_init(struct rsnd_mod *mod, ...@@ -44,6 +51,8 @@ static int rsnd_ctu_init(struct rsnd_mod *mod,
{ {
rsnd_mod_power_on(mod); rsnd_mod_power_on(mod);
rsnd_ctu_activation(mod);
rsnd_ctu_initialize_lock(mod); rsnd_ctu_initialize_lock(mod);
rsnd_mod_write(mod, CTU_ADINR, rsnd_get_adinr_chan(mod, io)); rsnd_mod_write(mod, CTU_ADINR, rsnd_get_adinr_chan(mod, io));
......
...@@ -260,6 +260,7 @@ static int rsnd_gen2_probe(struct rsnd_priv *priv) ...@@ -260,6 +260,7 @@ static int rsnd_gen2_probe(struct rsnd_priv *priv)
RSND_GEN_M_REG(SRC_SRCCR, 0x224, 0x40), RSND_GEN_M_REG(SRC_SRCCR, 0x224, 0x40),
RSND_GEN_M_REG(SRC_BSDSR, 0x22c, 0x40), RSND_GEN_M_REG(SRC_BSDSR, 0x22c, 0x40),
RSND_GEN_M_REG(SRC_BSISR, 0x238, 0x40), RSND_GEN_M_REG(SRC_BSISR, 0x238, 0x40),
RSND_GEN_M_REG(CTU_SWRSR, 0x500, 0x100),
RSND_GEN_M_REG(CTU_CTUIR, 0x504, 0x100), RSND_GEN_M_REG(CTU_CTUIR, 0x504, 0x100),
RSND_GEN_M_REG(CTU_ADINR, 0x508, 0x100), RSND_GEN_M_REG(CTU_ADINR, 0x508, 0x100),
RSND_GEN_M_REG(MIX_SWRSR, 0xd00, 0x40), RSND_GEN_M_REG(MIX_SWRSR, 0xd00, 0x40),
......
...@@ -86,6 +86,7 @@ enum rsnd_reg { ...@@ -86,6 +86,7 @@ enum rsnd_reg {
RSND_REG_CMD_BUSIF_DALIGN, /* Gen2 only */ RSND_REG_CMD_BUSIF_DALIGN, /* Gen2 only */
RSND_REG_CMD_ROUTE_SLCT, RSND_REG_CMD_ROUTE_SLCT,
RSND_REG_CMDOUT_TIMSEL, /* Gen2 only */ RSND_REG_CMDOUT_TIMSEL, /* Gen2 only */
RSND_REG_CTU_SWRSR,
RSND_REG_CTU_CTUIR, RSND_REG_CTU_CTUIR,
RSND_REG_CTU_ADINR, RSND_REG_CTU_ADINR,
RSND_REG_MIX_SWRSR, RSND_REG_MIX_SWRSR,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment