summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/fsl_sai.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/fsl/fsl_sai.c')
-rw-r--r--sound/soc/fsl/fsl_sai.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index 32f584f558d0..305af70660d9 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -1460,12 +1460,7 @@ static int fsl_sai_probe(struct platform_device *pdev)
fsl_sai_regmap_config = fsl_sai_v3_regmap_config;
sai->regmap = devm_regmap_init_mmio_clk(&pdev->dev,
- "bus", base, &fsl_sai_regmap_config);
-
- /* Compatible with old DTB cases */
- if (IS_ERR(sai->regmap) && PTR_ERR(sai->regmap) != -EPROBE_DEFER)
- sai->regmap = devm_regmap_init_mmio_clk(&pdev->dev,
- "sai", base, &fsl_sai_regmap_config);
+ NULL, base, &fsl_sai_regmap_config);
if (IS_ERR(sai->regmap)) {
dev_err(&pdev->dev, "regmap init failed\n");
return PTR_ERR(sai->regmap);
@@ -1574,6 +1569,11 @@ static int fsl_sai_probe(struct platform_device *pdev)
}
platform_set_drvdata(pdev, sai);
+
+ ret = clk_prepare_enable(sai->bus_clk);
+ if (ret)
+ return ret;
+
ret = fsl_sai_check_ver(&pdev->dev);
if (ret < 0)
dev_warn(&pdev->dev, "Error reading SAI version: %d\n", ret);
@@ -1600,6 +1600,8 @@ static int fsl_sai_probe(struct platform_device *pdev)
FSL_SAI_MCTL_MCLK_EN, FSL_SAI_MCTL_MCLK_EN);
}
+ clk_disable_unprepare(sai->bus_clk);
+
sai->dma_params_rx.chan_name = "rx";
sai->dma_params_tx.chan_name = "tx";
sai->dma_params_rx.addr = res->start + FSL_SAI_RDR0;