aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl/fsl_sai.c
diff options
context:
space:
mode:
authorXiubo Li <Li.Xiubo@freescale.com>2014-01-08 03:13:05 -0500
committerMark Brown <broonie@linaro.org>2014-01-08 07:24:01 -0500
commit633ff8f8a4393b4a13b94eddd2613198c32035e6 (patch)
tree51865f6aebb07c1556b98f555591fdd85b8dd2f8 /sound/soc/fsl/fsl_sai.c
parent72aa62bed3ea30635156fad95f123a0b665072bf (diff)
ASoC: fsl-sai: Clean up the code
Makes the code slightly shorter. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/fsl/fsl_sai.c')
-rw-r--r--sound/soc/fsl/fsl_sai.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index 5d38a6749b9f..cdd3fa830704 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -62,26 +62,25 @@ static int fsl_sai_set_dai_sysclk_tr(struct snd_soc_dai *cpu_dai,
62 reg_cr2 = FSL_SAI_RCR2; 62 reg_cr2 = FSL_SAI_RCR2;
63 63
64 val_cr2 = sai_readl(sai, sai->base + reg_cr2); 64 val_cr2 = sai_readl(sai, sai->base + reg_cr2);
65 val_cr2 &= ~FSL_SAI_CR2_MSEL_MASK;
66
65 switch (clk_id) { 67 switch (clk_id) {
66 case FSL_SAI_CLK_BUS: 68 case FSL_SAI_CLK_BUS:
67 val_cr2 &= ~FSL_SAI_CR2_MSEL_MASK;
68 val_cr2 |= FSL_SAI_CR2_MSEL_BUS; 69 val_cr2 |= FSL_SAI_CR2_MSEL_BUS;
69 break; 70 break;
70 case FSL_SAI_CLK_MAST1: 71 case FSL_SAI_CLK_MAST1:
71 val_cr2 &= ~FSL_SAI_CR2_MSEL_MASK;
72 val_cr2 |= FSL_SAI_CR2_MSEL_MCLK1; 72 val_cr2 |= FSL_SAI_CR2_MSEL_MCLK1;
73 break; 73 break;
74 case FSL_SAI_CLK_MAST2: 74 case FSL_SAI_CLK_MAST2:
75 val_cr2 &= ~FSL_SAI_CR2_MSEL_MASK;
76 val_cr2 |= FSL_SAI_CR2_MSEL_MCLK2; 75 val_cr2 |= FSL_SAI_CR2_MSEL_MCLK2;
77 break; 76 break;
78 case FSL_SAI_CLK_MAST3: 77 case FSL_SAI_CLK_MAST3:
79 val_cr2 &= ~FSL_SAI_CR2_MSEL_MASK;
80 val_cr2 |= FSL_SAI_CR2_MSEL_MCLK3; 78 val_cr2 |= FSL_SAI_CR2_MSEL_MCLK3;
81 break; 79 break;
82 default: 80 default:
83 return -EINVAL; 81 return -EINVAL;
84 } 82 }
83
85 sai_writel(sai, val_cr2, sai->base + reg_cr2); 84 sai_writel(sai, val_cr2, sai->base + reg_cr2);
86 85
87 return 0; 86 return 0;