aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2018-05-21 17:50:17 -0400
committerMark Brown <broonie@kernel.org>2018-05-22 06:57:17 -0400
commit05f38281c5e5272ff1d350ed8762b08c4f6d10fc (patch)
tree3d439ec9b5f0cb20fdd63a612bdc8ac9d4a5fbff
parent737e370a57e4e83ead04166e89a8b53eee9734b0 (diff)
ASoC: pxa-ssp: simplify pxa_ssp_set_dai_sysclk()
There's no need to read the register again prior to writing it, we did that in the beginning of the function. Signed-off-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/pxa/pxa-ssp.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c
index ffddcf117eb8..6fc986080130 100644
--- a/sound/soc/pxa/pxa-ssp.c
+++ b/sound/soc/pxa/pxa-ssp.c
@@ -217,10 +217,9 @@ static int pxa_ssp_set_dai_sysclk(struct snd_soc_dai *cpu_dai,
217{ 217{
218 struct ssp_priv *priv = snd_soc_dai_get_drvdata(cpu_dai); 218 struct ssp_priv *priv = snd_soc_dai_get_drvdata(cpu_dai);
219 struct ssp_device *ssp = priv->ssp; 219 struct ssp_device *ssp = priv->ssp;
220 int val;
221 220
222 u32 sscr0 = pxa_ssp_read_reg(ssp, SSCR0) & 221 u32 sscr0 = pxa_ssp_read_reg(ssp, SSCR0) &
223 ~(SSCR0_ECS | SSCR0_NCS | SSCR0_MOD | SSCR0_ACS); 222 ~(SSCR0_ECS | SSCR0_NCS | SSCR0_MOD | SSCR0_ACS);
224 223
225 dev_dbg(&ssp->pdev->dev, 224 dev_dbg(&ssp->pdev->dev,
226 "pxa_ssp_set_dai_sysclk id: %d, clk_id %d, freq %u\n", 225 "pxa_ssp_set_dai_sysclk id: %d, clk_id %d, freq %u\n",
@@ -258,8 +257,7 @@ static int pxa_ssp_set_dai_sysclk(struct snd_soc_dai *cpu_dai,
258 * on PXA2xx. On PXA3xx it must be enabled when doing so. */ 257 * on PXA2xx. On PXA3xx it must be enabled when doing so. */
259 if (ssp->type != PXA3xx_SSP) 258 if (ssp->type != PXA3xx_SSP)
260 clk_disable_unprepare(ssp->clk); 259 clk_disable_unprepare(ssp->clk);
261 val = pxa_ssp_read_reg(ssp, SSCR0) | sscr0; 260 pxa_ssp_write_reg(ssp, SSCR0, sscr0);
262 pxa_ssp_write_reg(ssp, SSCR0, val);
263 if (ssp->type != PXA3xx_SSP) 261 if (ssp->type != PXA3xx_SSP)
264 clk_prepare_enable(ssp->clk); 262 clk_prepare_enable(ssp->clk);
265 263