Commit 501bc1d7 authored by Nicolin Chen's avatar Nicolin Chen Committed by Mark Brown

ASoC: fsl_ssi: Clean up fsl_ssi_setup_regvals()

This patch cleans fsl_ssi_setup_regvals() by following changes:
1) Moving DBG bits to the first lines.
2) Setting SSIE, RE/TE as default and cleaning it for AC97
Signed-off-by: default avatarNicolin Chen <nicoleotsuka@gmail.com>
Tested-by: default avatarCaleb Crome <caleb@crome.org>
Tested-by: default avatarMaciej S. Szmigiero <mail@maciej.szmigiero.name>
Reviewed-by: default avatarMaciej S. Szmigiero <mail@maciej.szmigiero.name>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent b6c93f7f
...@@ -580,18 +580,16 @@ static void fsl_ssi_setup_regvals(struct fsl_ssi *ssi) ...@@ -580,18 +580,16 @@ static void fsl_ssi_setup_regvals(struct fsl_ssi *ssi)
{ {
struct fsl_ssi_regvals *vals = ssi->regvals; struct fsl_ssi_regvals *vals = ssi->regvals;
vals[RX].sier = SSI_SIER_RFF0_EN; vals[RX].sier = SSI_SIER_RFF0_EN | FSLSSI_SIER_DBG_RX_FLAGS;
vals[RX].srcr = SSI_SRCR_RFEN0; vals[RX].srcr = SSI_SRCR_RFEN0;
vals[RX].scr = 0; vals[RX].scr = SSI_SCR_SSIEN | SSI_SCR_RE;
vals[TX].sier = SSI_SIER_TFE0_EN; vals[TX].sier = SSI_SIER_TFE0_EN | FSLSSI_SIER_DBG_TX_FLAGS;
vals[TX].stcr = SSI_STCR_TFEN0; vals[TX].stcr = SSI_STCR_TFEN0;
vals[TX].scr = 0; vals[TX].scr = SSI_SCR_SSIEN | SSI_SCR_TE;
/* AC97 has already enabled SSIEN, RE and TE, so ignore them */ /* AC97 has already enabled SSIEN, RE and TE, so ignore them */
if (!fsl_ssi_is_ac97(ssi)) { if (fsl_ssi_is_ac97(ssi))
vals[RX].scr = SSI_SCR_SSIEN | SSI_SCR_RE; vals[RX].scr = vals[TX].scr = 0;
vals[TX].scr = SSI_SCR_SSIEN | SSI_SCR_TE;
}
if (ssi->use_dma) { if (ssi->use_dma) {
vals[RX].sier |= SSI_SIER_RDMAE; vals[RX].sier |= SSI_SIER_RDMAE;
...@@ -600,9 +598,6 @@ static void fsl_ssi_setup_regvals(struct fsl_ssi *ssi) ...@@ -600,9 +598,6 @@ static void fsl_ssi_setup_regvals(struct fsl_ssi *ssi)
vals[RX].sier |= SSI_SIER_RIE; vals[RX].sier |= SSI_SIER_RIE;
vals[TX].sier |= SSI_SIER_TIE; vals[TX].sier |= SSI_SIER_TIE;
} }
vals[RX].sier |= FSLSSI_SIER_DBG_RX_FLAGS;
vals[TX].sier |= FSLSSI_SIER_DBG_TX_FLAGS;
} }
static void fsl_ssi_setup_ac97(struct fsl_ssi *ssi) static void fsl_ssi_setup_ac97(struct fsl_ssi *ssi)
......
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