FSL_SAI_CR3_TRCE_MASK, 0);
}
-@@ -643,20 +633,18 @@ static const struct snd_soc_dai_ops fsl_
+@@ -643,20 +633,17 @@ static const struct snd_soc_dai_ops fsl_
static int fsl_sai_dai_probe(struct snd_soc_dai *cpu_dai)
{
struct fsl_sai *sai = dev_get_drvdata(cpu_dai->dev);
+ regmap_write(sai->regmap, FSL_SAI_RCSR, 0);
- regmap_update_bits(sai->regmap, FSL_SAI_TCR1(ofs),
-- FSL_SAI_CR1_RFW_MASK,
+- FSL_SAI_CR1_RFW_MASK(sai->soc_data->fifo_depth),
+ regmap_update_bits(sai->regmap, FSL_SAI_TCR1, FSL_SAI_CR1_RFW_MASK,
sai->soc_data->fifo_depth - FSL_SAI_MAXBURST_TX);
- regmap_update_bits(sai->regmap, FSL_SAI_RCR1(ofs),
-- FSL_SAI_CR1_RFW_MASK, FSL_SAI_MAXBURST_RX - 1);
+- FSL_SAI_CR1_RFW_MASK(sai->soc_data->fifo_depth),
+ regmap_update_bits(sai->regmap, FSL_SAI_RCR1, FSL_SAI_CR1_RFW_MASK,
-+ FSL_SAI_MAXBURST_RX - 1);
+ FSL_SAI_MAXBURST_RX - 1);
snd_soc_dai_init_dma_data(cpu_dai, &sai->dma_params_tx,
- &sai->dma_params_rx);
-@@ -693,12 +681,12 @@ static const struct snd_soc_component_dr
+@@ -694,12 +681,12 @@ static const struct snd_soc_component_dr
.name = "fsl-sai",
};
{FSL_SAI_TDR0, 0},
{FSL_SAI_TDR1, 0},
{FSL_SAI_TDR2, 0},
-@@ -707,50 +695,24 @@ static struct reg_default fsl_sai_reg_de
+@@ -708,50 +695,24 @@ static struct reg_default fsl_sai_reg_de
{FSL_SAI_TDR5, 0},
{FSL_SAI_TDR6, 0},
{FSL_SAI_TDR7, 0},
case FSL_SAI_TFR0:
case FSL_SAI_TFR1:
case FSL_SAI_TFR2:
-@@ -760,6 +722,12 @@ static bool fsl_sai_readable_reg(struct
+@@ -761,6 +722,12 @@ static bool fsl_sai_readable_reg(struct
case FSL_SAI_TFR6:
case FSL_SAI_TFR7:
case FSL_SAI_TMR:
case FSL_SAI_RDR0:
case FSL_SAI_RDR1:
case FSL_SAI_RDR2:
-@@ -785,13 +753,9 @@ static bool fsl_sai_readable_reg(struct
+@@ -786,13 +753,9 @@ static bool fsl_sai_readable_reg(struct
static bool fsl_sai_volatile_reg(struct device *dev, unsigned int reg)
{
case FSL_SAI_TFR0:
case FSL_SAI_TFR1:
case FSL_SAI_TFR2:
-@@ -824,16 +788,13 @@ static bool fsl_sai_volatile_reg(struct
+@@ -825,16 +788,13 @@ static bool fsl_sai_volatile_reg(struct
static bool fsl_sai_writeable_reg(struct device *dev, unsigned int reg)
{
case FSL_SAI_TDR0:
case FSL_SAI_TDR1:
case FSL_SAI_TDR2:
-@@ -843,6 +804,12 @@ static bool fsl_sai_writeable_reg(struct
+@@ -844,6 +804,12 @@ static bool fsl_sai_writeable_reg(struct
case FSL_SAI_TDR6:
case FSL_SAI_TDR7:
case FSL_SAI_TMR:
case FSL_SAI_RMR:
return true;
default:
-@@ -850,15 +817,15 @@ static bool fsl_sai_writeable_reg(struct
+@@ -851,15 +817,15 @@ static bool fsl_sai_writeable_reg(struct
}
}
.readable_reg = fsl_sai_readable_reg,
.volatile_reg = fsl_sai_volatile_reg,
.writeable_reg = fsl_sai_writeable_reg,
-@@ -890,12 +857,6 @@ static int fsl_sai_probe(struct platform
+@@ -891,12 +857,6 @@ static int fsl_sai_probe(struct platform
if (IS_ERR(base))
return PTR_ERR(base);
sai->regmap = devm_regmap_init_mmio_clk(&pdev->dev,
"bus", base, &fsl_sai_regmap_config);
-@@ -1022,13 +983,11 @@ static int fsl_sai_remove(struct platfor
+@@ -1023,13 +983,11 @@ static int fsl_sai_remove(struct platfor
static const struct fsl_sai_soc_data fsl_sai_vf610_data = {
.use_imx_pcm = false,
.fifo_depth = 32,
};
static const struct of_device_id fsl_sai_ids[] = {
-@@ -1061,7 +1020,6 @@ static int fsl_sai_runtime_suspend(struc
+@@ -1062,7 +1020,6 @@ static int fsl_sai_runtime_suspend(struc
static int fsl_sai_runtime_resume(struct device *dev)
{
struct fsl_sai *sai = dev_get_drvdata(dev);
int ret;
ret = clk_prepare_enable(sai->bus_clk);
-@@ -1083,11 +1041,11 @@ static int fsl_sai_runtime_resume(struct
+@@ -1084,11 +1041,11 @@ static int fsl_sai_runtime_resume(struct
}
regcache_cache_only(sai->regmap, false);