1 From 6e0abca40338d5078be0e5947c7f9723b40bc7e7 Mon Sep 17 00:00:00 2001
2 From: Dong Aisheng <aisheng.dong@nxp.com>
3 Date: Mon, 30 Mar 2020 16:17:52 +0800
4 Subject: [PATCH] Revert "ASoC: fsl_sai: add of_match data"
6 This reverts commit 89c9679f699d88986ce552738dc7c5c500c8fc67.
9 Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
11 sound/soc/fsl/fsl_sai.c | 22 ++++++++--------------
12 sound/soc/fsl/fsl_sai.h | 6 +-----
13 2 files changed, 9 insertions(+), 19 deletions(-)
15 --- a/sound/soc/fsl/fsl_sai.c
16 +++ b/sound/soc/fsl/fsl_sai.c
18 #include <linux/dmaengine.h>
19 #include <linux/module.h>
20 #include <linux/of_address.h>
21 -#include <linux/of_device.h>
22 #include <linux/pm_runtime.h>
23 #include <linux/regmap.h>
24 #include <linux/slab.h>
25 @@ -789,7 +788,10 @@ static int fsl_sai_probe(struct platform
29 - sai->soc_data = of_device_get_match_data(&pdev->dev);
31 + if (of_device_is_compatible(np, "fsl,imx6sx-sai") ||
32 + of_device_is_compatible(np, "fsl,imx6ul-sai"))
33 + sai->sai_on_imx = true;
35 sai->is_lsb_first = of_property_read_bool(np, "lsb-first");
37 @@ -901,7 +903,7 @@ static int fsl_sai_probe(struct platform
41 - if (sai->soc_data->use_imx_pcm) {
42 + if (sai->sai_on_imx)
43 ret = imx_pcm_dma_init(pdev, IMX_SAI_DMABUF_SIZE);
46 @@ -926,18 +928,10 @@ static int fsl_sai_remove(struct platfor
50 -static const struct fsl_sai_soc_data fsl_sai_vf610_data = {
51 - .use_imx_pcm = false,
54 -static const struct fsl_sai_soc_data fsl_sai_imx6sx_data = {
55 - .use_imx_pcm = true,
58 static const struct of_device_id fsl_sai_ids[] = {
59 - { .compatible = "fsl,vf610-sai", .data = &fsl_sai_vf610_data },
60 - { .compatible = "fsl,imx6sx-sai", .data = &fsl_sai_imx6sx_data },
61 - { .compatible = "fsl,imx6ul-sai", .data = &fsl_sai_imx6sx_data },
62 + { .compatible = "fsl,vf610-sai", },
63 + { .compatible = "fsl,imx6sx-sai", },
64 + { .compatible = "fsl,imx6ul-sai", },
67 MODULE_DEVICE_TABLE(of, fsl_sai_ids);
68 --- a/sound/soc/fsl/fsl_sai.h
69 +++ b/sound/soc/fsl/fsl_sai.h
71 #define FSL_SAI_MAXBURST_TX 6
72 #define FSL_SAI_MAXBURST_RX 6
74 -struct fsl_sai_soc_data {
79 struct platform_device *pdev;
80 struct regmap *regmap;
81 @@ -139,6 +135,7 @@ struct fsl_sai {
88 unsigned int mclk_id[2];
89 @@ -146,7 +143,6 @@ struct fsl_sai {
91 unsigned int slot_width;
93 - const struct fsl_sai_soc_data *soc_data;
94 struct snd_soc_dai_driver cpu_dai_drv;
95 struct snd_dmaengine_dai_dma_data dma_params_rx;
96 struct snd_dmaengine_dai_dma_data dma_params_tx;