aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2017-02-28 16:23:07 +0100
committerLinus Walleij <linus.walleij@linaro.org>2017-08-10 10:05:44 +0200
commit93c358aee0ed21e57dcc8514d7ba51de8709df08 (patch)
tree1869a277f7da9dba4152c5c266e6291ffecc5ef0
parentaae4e7a8bc44722fe70d58920a36916b1043195e (diff)
ASoC: ux500: clean out non-DT codepaths
This removes the non-devicetree codepaths for the Ux500 ASoC integration. They are no longer in use. Also cut down a bit on debug prints since we do not do much active development on this SoC. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--sound/soc/ux500/mop500.c29
-rw-r--r--sound/soc/ux500/ux500_msp_dai.c32
-rw-r--r--sound/soc/ux500/ux500_msp_i2s.c22
-rw-r--r--sound/soc/ux500/ux500_msp_i2s.h3
-rw-r--r--sound/soc/ux500/ux500_pcm.c15
5 files changed, 14 insertions, 87 deletions
diff --git a/sound/soc/ux500/mop500.c b/sound/soc/ux500/mop500.c
index ba9fc099cf67..034ec1b80050 100644
--- a/sound/soc/ux500/mop500.c
+++ b/sound/soc/ux500/mop500.c
@@ -31,21 +31,14 @@ static struct snd_soc_dai_link mop500_dai_links[] = {
{
.name = "ab8500_0",
.stream_name = "ab8500_0",
- .cpu_dai_name = "ux500-msp-i2s.1",
.codec_dai_name = "ab8500-codec-dai.0",
- .platform_name = "ux500-msp-i2s.1",
- .codec_name = "ab8500-codec.0",
.init = mop500_ab8500_machine_init,
.ops = mop500_ab8500_ops,
},
{
.name = "ab8500_1",
.stream_name = "ab8500_1",
- .cpu_dai_name = "ux500-msp-i2s.3",
.codec_dai_name = "ab8500-codec-dai.1",
- .platform_name = "ux500-msp-i2s.3",
- .codec_name = "ab8500-codec.0",
- .init = NULL,
.ops = mop500_ab8500_ops,
},
};
@@ -103,30 +96,16 @@ static int mop500_probe(struct platform_device *pdev)
struct device_node *np = pdev->dev.of_node;
int ret;
- dev_dbg(&pdev->dev, "%s: Enter.\n", __func__);
-
mop500_card.dev = &pdev->dev;
- if (np) {
- ret = mop500_of_probe(pdev, np);
- if (ret)
- return ret;
- }
+ ret = mop500_of_probe(pdev, np);
+ if (ret)
+ return ret;
- dev_dbg(&pdev->dev, "%s: Card %s: Set platform drvdata.\n",
- __func__, mop500_card.name);
platform_set_drvdata(pdev, &mop500_card);
snd_soc_card_set_drvdata(&mop500_card, NULL);
- dev_dbg(&pdev->dev, "%s: Card %s: num_links = %d\n",
- __func__, mop500_card.name, mop500_card.num_links);
- dev_dbg(&pdev->dev, "%s: Card %s: DAI-link 0: name = %s\n",
- __func__, mop500_card.name, mop500_card.dai_link[0].name);
- dev_dbg(&pdev->dev, "%s: Card %s: DAI-link 0: stream_name = %s\n",
- __func__, mop500_card.name,
- mop500_card.dai_link[0].stream_name);
-
ret = snd_soc_register_card(&mop500_card);
if (ret)
dev_err(&pdev->dev,
@@ -139,8 +118,6 @@ static int mop500_remove(struct platform_device *pdev)
{
struct snd_soc_card *mop500_card = platform_get_drvdata(pdev);
- pr_debug("%s: Enter.\n", __func__);
-
snd_soc_unregister_card(mop500_card);
mop500_ab8500_remove(mop500_card);
mop500_of_node_put();
diff --git a/sound/soc/ux500/ux500_msp_dai.c b/sound/soc/ux500/ux500_msp_dai.c
index ec5152aa3f6e..0f293956fbb9 100644
--- a/sound/soc/ux500/ux500_msp_dai.c
+++ b/sound/soc/ux500/ux500_msp_dai.c
@@ -658,7 +658,7 @@ static int ux500_msp_dai_trigger(struct snd_pcm_substream *substream,
return ret;
}
-static int ux500_msp_dai_of_probe(struct snd_soc_dai *dai)
+static int ux500_msp_dai_probe(struct snd_soc_dai *dai)
{
struct ux500_msp_i2s_drvdata *drvdata = dev_get_drvdata(dai->dev);
struct snd_dmaengine_dai_dma_data *playback_dma_data;
@@ -687,26 +687,6 @@ static int ux500_msp_dai_of_probe(struct snd_soc_dai *dai)
return 0;
}
-static int ux500_msp_dai_probe(struct snd_soc_dai *dai)
-{
- struct ux500_msp_i2s_drvdata *drvdata = dev_get_drvdata(dai->dev);
- struct msp_i2s_platform_data *pdata = dai->dev->platform_data;
- int ret;
-
- if (!pdata) {
- ret = ux500_msp_dai_of_probe(dai);
- return ret;
- }
-
- drvdata->msp->playback_dma_data.data_size = drvdata->slot_width;
- drvdata->msp->capture_dma_data.data_size = drvdata->slot_width;
-
- snd_soc_dai_init_dma_data(dai,
- &drvdata->msp->playback_dma_data,
- &drvdata->msp->capture_dma_data);
- return 0;
-}
-
static struct snd_soc_dai_ops ux500_msp_dai_ops[] = {
{
.set_sysclk = ux500_msp_dai_set_dai_sysclk,
@@ -743,15 +723,8 @@ static const struct snd_soc_component_driver ux500_msp_component = {
static int ux500_msp_drv_probe(struct platform_device *pdev)
{
struct ux500_msp_i2s_drvdata *drvdata;
- struct msp_i2s_platform_data *pdata = pdev->dev.platform_data;
- struct device_node *np = pdev->dev.of_node;
int ret = 0;
- if (!pdata && !np) {
- dev_err(&pdev->dev, "No platform data or Device Tree found\n");
- return -ENODEV;
- }
-
drvdata = devm_kzalloc(&pdev->dev,
sizeof(struct ux500_msp_i2s_drvdata),
GFP_KERNEL);
@@ -793,8 +766,7 @@ static int ux500_msp_drv_probe(struct platform_device *pdev)
return ret;
}
- ret = ux500_msp_i2s_init_msp(pdev, &drvdata->msp,
- pdev->dev.platform_data);
+ ret = ux500_msp_i2s_init_msp(pdev, &drvdata->msp);
if (!drvdata->msp) {
dev_err(&pdev->dev,
"%s: ERROR: Failed to init MSP-struct (%d)!",
diff --git a/sound/soc/ux500/ux500_msp_i2s.c b/sound/soc/ux500/ux500_msp_i2s.c
index bd5266aca0f1..e919da59ff1e 100644
--- a/sound/soc/ux500/ux500_msp_i2s.c
+++ b/sound/soc/ux500/ux500_msp_i2s.c
@@ -674,11 +674,10 @@ static int ux500_msp_i2s_of_init_msp(struct platform_device *pdev,
}
int ux500_msp_i2s_init_msp(struct platform_device *pdev,
- struct ux500_msp **msp_p,
- struct msp_i2s_platform_data *platform_data)
+ struct ux500_msp **msp_p)
{
struct resource *res = NULL;
- struct device_node *np = pdev->dev.of_node;
+ struct msp_i2s_platform_data *platform_data;
struct ux500_msp *msp;
int ret;
@@ -687,19 +686,9 @@ int ux500_msp_i2s_init_msp(struct platform_device *pdev,
if (!msp)
return -ENOMEM;
- if (!platform_data) {
- if (np) {
- ret = ux500_msp_i2s_of_init_msp(pdev, msp,
- &platform_data);
- if (ret)
- return ret;
- } else
- return -EINVAL;
- } else {
- msp->playback_dma_data.dma_cfg = platform_data->msp_i2s_dma_tx;
- msp->capture_dma_data.dma_cfg = platform_data->msp_i2s_dma_rx;
- msp->id = platform_data->id;
- }
+ ret = ux500_msp_i2s_of_init_msp(pdev, msp, &platform_data);
+ if (ret)
+ return ret;
msp->dev = &pdev->dev;
@@ -729,7 +718,6 @@ int ux500_msp_i2s_init_msp(struct platform_device *pdev,
void ux500_msp_i2s_cleanup_msp(struct platform_device *pdev,
struct ux500_msp *msp)
{
- dev_dbg(msp->dev, "%s: Enter (id = %d).\n", __func__, msp->id);
}
MODULE_LICENSE("GPL v2");
diff --git a/sound/soc/ux500/ux500_msp_i2s.h b/sound/soc/ux500/ux500_msp_i2s.h
index 875de0f68b85..45b287b9f32e 100644
--- a/sound/soc/ux500/ux500_msp_i2s.h
+++ b/sound/soc/ux500/ux500_msp_i2s.h
@@ -489,8 +489,7 @@ struct ux500_msp {
struct msp_i2s_platform_data;
int ux500_msp_i2s_init_msp(struct platform_device *pdev,
- struct ux500_msp **msp_p,
- struct msp_i2s_platform_data *platform_data);
+ struct ux500_msp **msp_p);
void ux500_msp_i2s_cleanup_msp(struct platform_device *pdev,
struct ux500_msp *msp);
int ux500_msp_i2s_open(struct ux500_msp *msp, struct ux500_msp_config *config);
diff --git a/sound/soc/ux500/ux500_pcm.c b/sound/soc/ux500/ux500_pcm.c
index f12c01dddc8d..384744db13ac 100644
--- a/sound/soc/ux500/ux500_pcm.c
+++ b/sound/soc/ux500/ux500_pcm.c
@@ -123,14 +123,9 @@ static int ux500_pcm_prepare_slave_config(struct snd_pcm_substream *substream,
return 0;
}
-static const struct snd_dmaengine_pcm_config ux500_dmaengine_pcm_config = {
- .pcm_hardware = &ux500_pcm_hw,
- .compat_request_channel = ux500_pcm_request_chan,
- .prealloc_buffer_size = 128 * 1024,
- .prepare_slave_config = ux500_pcm_prepare_slave_config,
-};
-
static const struct snd_dmaengine_pcm_config ux500_dmaengine_of_pcm_config = {
+ .pcm_hardware = &ux500_pcm_hw, /* FIXME: from devicetree?? */
+ .prealloc_buffer_size = 128 * 1024, /* FIXME: from devicetree ?? */
.compat_request_channel = ux500_pcm_request_chan,
.prepare_slave_config = ux500_pcm_prepare_slave_config,
};
@@ -138,13 +133,9 @@ static const struct snd_dmaengine_pcm_config ux500_dmaengine_of_pcm_config = {
int ux500_pcm_register_platform(struct platform_device *pdev)
{
const struct snd_dmaengine_pcm_config *pcm_config;
- struct device_node *np = pdev->dev.of_node;
int ret;
- if (np)
- pcm_config = &ux500_dmaengine_of_pcm_config;
- else
- pcm_config = &ux500_dmaengine_pcm_config;
+ pcm_config = &ux500_dmaengine_of_pcm_config;
ret = snd_dmaengine_pcm_register(&pdev->dev, pcm_config,
SND_DMAENGINE_PCM_FLAG_COMPAT);