aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/sh
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2015-11-10 00:13:33 -0500
committerMark Brown <broonie@kernel.org>2015-11-18 13:08:16 -0500
commite797f58ead6069478e535ae62b180da87b28a84f (patch)
tree79741ce9beec1db2a2a3152547bc62c7229cd74a /sound/soc/sh
parent348d592c719da61a7dab289c7ce36e73c7caf063 (diff)
ASoC: rsnd: remove struct rsnd_of_data
No board is using Renesas sound driver via platform boot now. This means all user is using DT boot. Platform boot support is no longer needed. But, it strongly depends on platform boot style. Now, platform boot style was removed from driver. This is cleanup patch, and remove pointless struct rsnd_of_data Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sh')
-rw-r--r--sound/soc/sh/rcar/adg.c1
-rw-r--r--sound/soc/sh/rcar/cmd.c1
-rw-r--r--sound/soc/sh/rcar/core.c25
-rw-r--r--sound/soc/sh/rcar/ctu.c1
-rw-r--r--sound/soc/sh/rcar/dma.c1
-rw-r--r--sound/soc/sh/rcar/dvc.c1
-rw-r--r--sound/soc/sh/rcar/gen.c1
-rw-r--r--sound/soc/sh/rcar/mix.c1
-rw-r--r--sound/soc/sh/rcar/rsnd.h15
-rw-r--r--sound/soc/sh/rcar/src.c1
-rw-r--r--sound/soc/sh/rcar/ssi.c1
-rw-r--r--sound/soc/sh/rcar/ssiu.c1
12 files changed, 5 insertions, 45 deletions
diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c
index 1dffde3218be..ba80961a8fa8 100644
--- a/sound/soc/sh/rcar/adg.c
+++ b/sound/soc/sh/rcar/adg.c
@@ -516,7 +516,6 @@ static void rsnd_adg_get_clkout(struct rsnd_priv *priv,
516} 516}
517 517
518int rsnd_adg_probe(struct platform_device *pdev, 518int rsnd_adg_probe(struct platform_device *pdev,
519 const struct rsnd_of_data *of_data,
520 struct rsnd_priv *priv) 519 struct rsnd_priv *priv)
521{ 520{
522 struct rsnd_adg *adg; 521 struct rsnd_adg *adg;
diff --git a/sound/soc/sh/rcar/cmd.c b/sound/soc/sh/rcar/cmd.c
index 47ef47c22217..2294c5c7a25a 100644
--- a/sound/soc/sh/rcar/cmd.c
+++ b/sound/soc/sh/rcar/cmd.c
@@ -128,7 +128,6 @@ struct rsnd_mod *rsnd_cmd_mod_get(struct rsnd_priv *priv, int id)
128} 128}
129 129
130int rsnd_cmd_probe(struct platform_device *pdev, 130int rsnd_cmd_probe(struct platform_device *pdev,
131 const struct rsnd_of_data *of_data,
132 struct rsnd_priv *priv) 131 struct rsnd_priv *priv)
133{ 132{
134 struct device *dev = rsnd_priv_to_dev(priv); 133 struct device *dev = rsnd_priv_to_dev(priv);
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index 6043c71d10c9..8b9d721acb41 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -99,18 +99,10 @@
99#define RSND_RATES SNDRV_PCM_RATE_8000_96000 99#define RSND_RATES SNDRV_PCM_RATE_8000_96000
100#define RSND_FMTS (SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S16_LE) 100#define RSND_FMTS (SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S16_LE)
101 101
102static const struct rsnd_of_data rsnd_of_data_gen1 = {
103 .flags = RSND_GEN1,
104};
105
106static const struct rsnd_of_data rsnd_of_data_gen2 = {
107 .flags = RSND_GEN2,
108};
109
110static const struct of_device_id rsnd_of_match[] = { 102static const struct of_device_id rsnd_of_match[] = {
111 { .compatible = "renesas,rcar_sound-gen1", .data = &rsnd_of_data_gen1 }, 103 { .compatible = "renesas,rcar_sound-gen1", .data = (void *)RSND_GEN1 },
112 { .compatible = "renesas,rcar_sound-gen2", .data = &rsnd_of_data_gen2 }, 104 { .compatible = "renesas,rcar_sound-gen2", .data = (void *)RSND_GEN2 },
113 { .compatible = "renesas,rcar_sound-gen3", .data = &rsnd_of_data_gen2 }, /* gen2 compatible */ 105 { .compatible = "renesas,rcar_sound-gen3", .data = (void *)RSND_GEN2 }, /* gen2 compatible */
114 {}, 106 {},
115}; 107};
116MODULE_DEVICE_TABLE(of, rsnd_of_match); 108MODULE_DEVICE_TABLE(of, rsnd_of_match);
@@ -569,7 +561,6 @@ static const struct snd_soc_dai_ops rsnd_soc_dai_ops = {
569}; 561};
570 562
571static int rsnd_dai_probe(struct platform_device *pdev, 563static int rsnd_dai_probe(struct platform_device *pdev,
572 const struct rsnd_of_data *of_data,
573 struct rsnd_priv *priv) 564 struct rsnd_priv *priv)
574{ 565{
575 struct device_node *dai_node; 566 struct device_node *dai_node;
@@ -583,9 +574,6 @@ static int rsnd_dai_probe(struct platform_device *pdev,
583 int nr, dai_i, io_i, np_i; 574 int nr, dai_i, io_i, np_i;
584 int ret; 575 int ret;
585 576
586 if (!of_data)
587 return 0;
588
589 dai_node = rsnd_dai_of_node(priv); 577 dai_node = rsnd_dai_of_node(priv);
590 nr = of_get_child_count(dai_node); 578 nr = of_get_child_count(dai_node);
591 if (!nr) { 579 if (!nr) {
@@ -1002,9 +990,7 @@ static int rsnd_probe(struct platform_device *pdev)
1002 struct device *dev = &pdev->dev; 990 struct device *dev = &pdev->dev;
1003 struct rsnd_dai *rdai; 991 struct rsnd_dai *rdai;
1004 const struct of_device_id *of_id = of_match_device(rsnd_of_match, dev); 992 const struct of_device_id *of_id = of_match_device(rsnd_of_match, dev);
1005 const struct rsnd_of_data *of_data;
1006 int (*probe_func[])(struct platform_device *pdev, 993 int (*probe_func[])(struct platform_device *pdev,
1007 const struct rsnd_of_data *of_data,
1008 struct rsnd_priv *priv) = { 994 struct rsnd_priv *priv) = {
1009 rsnd_gen_probe, 995 rsnd_gen_probe,
1010 rsnd_dma_probe, 996 rsnd_dma_probe,
@@ -1024,7 +1010,6 @@ static int rsnd_probe(struct platform_device *pdev)
1024 GFP_KERNEL); 1010 GFP_KERNEL);
1025 if (!info) 1011 if (!info)
1026 return -ENOMEM; 1012 return -ENOMEM;
1027 of_data = of_id->data;
1028 1013
1029 /* 1014 /*
1030 * init priv data 1015 * init priv data
@@ -1037,14 +1022,14 @@ static int rsnd_probe(struct platform_device *pdev)
1037 1022
1038 priv->pdev = pdev; 1023 priv->pdev = pdev;
1039 priv->info = info; 1024 priv->info = info;
1040 priv->flags = of_data->flags; 1025 priv->flags = (u32)of_id->data;
1041 spin_lock_init(&priv->lock); 1026 spin_lock_init(&priv->lock);
1042 1027
1043 /* 1028 /*
1044 * init each module 1029 * init each module
1045 */ 1030 */
1046 for (i = 0; i < ARRAY_SIZE(probe_func); i++) { 1031 for (i = 0; i < ARRAY_SIZE(probe_func); i++) {
1047 ret = probe_func[i](pdev, of_data, priv); 1032 ret = probe_func[i](pdev, priv);
1048 if (ret) 1033 if (ret)
1049 return ret; 1034 return ret;
1050 } 1035 }
diff --git a/sound/soc/sh/rcar/ctu.c b/sound/soc/sh/rcar/ctu.c
index 9506db4958bc..3e36a5325ce4 100644
--- a/sound/soc/sh/rcar/ctu.c
+++ b/sound/soc/sh/rcar/ctu.c
@@ -78,7 +78,6 @@ struct rsnd_mod *rsnd_ctu_mod_get(struct rsnd_priv *priv, int id)
78} 78}
79 79
80int rsnd_ctu_probe(struct platform_device *pdev, 80int rsnd_ctu_probe(struct platform_device *pdev,
81 const struct rsnd_of_data *of_data,
82 struct rsnd_priv *priv) 81 struct rsnd_priv *priv)
83{ 82{
84 struct device_node *node; 83 struct device_node *node;
diff --git a/sound/soc/sh/rcar/dma.c b/sound/soc/sh/rcar/dma.c
index 9917b985c403..e5f435361d96 100644
--- a/sound/soc/sh/rcar/dma.c
+++ b/sound/soc/sh/rcar/dma.c
@@ -702,7 +702,6 @@ struct rsnd_mod *rsnd_dma_attach(struct rsnd_dai_stream *io,
702} 702}
703 703
704int rsnd_dma_probe(struct platform_device *pdev, 704int rsnd_dma_probe(struct platform_device *pdev,
705 const struct rsnd_of_data *of_data,
706 struct rsnd_priv *priv) 705 struct rsnd_priv *priv)
707{ 706{
708 struct device *dev = rsnd_priv_to_dev(priv); 707 struct device *dev = rsnd_priv_to_dev(priv);
diff --git a/sound/soc/sh/rcar/dvc.c b/sound/soc/sh/rcar/dvc.c
index a550b75ff9ac..d2c03bd94fcb 100644
--- a/sound/soc/sh/rcar/dvc.c
+++ b/sound/soc/sh/rcar/dvc.c
@@ -305,7 +305,6 @@ struct rsnd_mod *rsnd_dvc_mod_get(struct rsnd_priv *priv, int id)
305} 305}
306 306
307int rsnd_dvc_probe(struct platform_device *pdev, 307int rsnd_dvc_probe(struct platform_device *pdev,
308 const struct rsnd_of_data *of_data,
309 struct rsnd_priv *priv) 308 struct rsnd_priv *priv)
310{ 309{
311 struct device_node *node; 310 struct device_node *node;
diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c
index 099a1cd2d245..ced8acb7a7ec 100644
--- a/sound/soc/sh/rcar/gen.c
+++ b/sound/soc/sh/rcar/gen.c
@@ -350,7 +350,6 @@ static int rsnd_gen1_probe(struct platform_device *pdev,
350 * Gen 350 * Gen
351 */ 351 */
352int rsnd_gen_probe(struct platform_device *pdev, 352int rsnd_gen_probe(struct platform_device *pdev,
353 const struct rsnd_of_data *of_data,
354 struct rsnd_priv *priv) 353 struct rsnd_priv *priv)
355{ 354{
356 struct device *dev = rsnd_priv_to_dev(priv); 355 struct device *dev = rsnd_priv_to_dev(priv);
diff --git a/sound/soc/sh/rcar/mix.c b/sound/soc/sh/rcar/mix.c
index 8b615c7aecb4..897e4f3d4c24 100644
--- a/sound/soc/sh/rcar/mix.c
+++ b/sound/soc/sh/rcar/mix.c
@@ -117,7 +117,6 @@ struct rsnd_mod *rsnd_mix_mod_get(struct rsnd_priv *priv, int id)
117} 117}
118 118
119int rsnd_mix_probe(struct platform_device *pdev, 119int rsnd_mix_probe(struct platform_device *pdev,
120 const struct rsnd_of_data *of_data,
121 struct rsnd_priv *priv) 120 struct rsnd_priv *priv)
122{ 121{
123 struct device_node *node; 122 struct device_node *node;
diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
index c1cf16db6405..0ad3d0d20a81 100644
--- a/sound/soc/sh/rcar/rsnd.h
+++ b/sound/soc/sh/rcar/rsnd.h
@@ -115,7 +115,6 @@ enum rsnd_reg {
115 RSND_REG_MAX, 115 RSND_REG_MAX,
116}; 116};
117 117
118struct rsnd_of_data;
119struct rsnd_priv; 118struct rsnd_priv;
120struct rsnd_mod; 119struct rsnd_mod;
121struct rsnd_dai; 120struct rsnd_dai;
@@ -150,7 +149,6 @@ u32 rsnd_get_dalign(struct rsnd_mod *mod, struct rsnd_dai_stream *io);
150struct rsnd_mod *rsnd_dma_attach(struct rsnd_dai_stream *io, 149struct rsnd_mod *rsnd_dma_attach(struct rsnd_dai_stream *io,
151 struct rsnd_mod *mod, int id); 150 struct rsnd_mod *mod, int id);
152int rsnd_dma_probe(struct platform_device *pdev, 151int rsnd_dma_probe(struct platform_device *pdev,
153 const struct rsnd_of_data *of_data,
154 struct rsnd_priv *priv); 152 struct rsnd_priv *priv);
155struct dma_chan *rsnd_dma_request_channel(struct device_node *of_node, 153struct dma_chan *rsnd_dma_request_channel(struct device_node *of_node,
156 struct rsnd_mod *mod, char *name); 154 struct rsnd_mod *mod, char *name);
@@ -345,7 +343,6 @@ int rsnd_dai_connect(struct rsnd_mod *mod,
345 * R-Car Gen1/Gen2 343 * R-Car Gen1/Gen2
346 */ 344 */
347int rsnd_gen_probe(struct platform_device *pdev, 345int rsnd_gen_probe(struct platform_device *pdev,
348 const struct rsnd_of_data *of_data,
349 struct rsnd_priv *priv); 346 struct rsnd_priv *priv);
350void __iomem *rsnd_gen_reg_get(struct rsnd_priv *priv, 347void __iomem *rsnd_gen_reg_get(struct rsnd_priv *priv,
351 struct rsnd_mod *mod, 348 struct rsnd_mod *mod,
@@ -358,7 +355,6 @@ phys_addr_t rsnd_gen_get_phy_addr(struct rsnd_priv *priv, int reg_id);
358int rsnd_adg_ssi_clk_stop(struct rsnd_mod *mod); 355int rsnd_adg_ssi_clk_stop(struct rsnd_mod *mod);
359int rsnd_adg_ssi_clk_try_start(struct rsnd_mod *mod, unsigned int rate); 356int rsnd_adg_ssi_clk_try_start(struct rsnd_mod *mod, unsigned int rate);
360int rsnd_adg_probe(struct platform_device *pdev, 357int rsnd_adg_probe(struct platform_device *pdev,
361 const struct rsnd_of_data *of_data,
362 struct rsnd_priv *priv); 358 struct rsnd_priv *priv);
363void rsnd_adg_remove(struct platform_device *pdev, 359void rsnd_adg_remove(struct platform_device *pdev,
364 struct rsnd_priv *priv); 360 struct rsnd_priv *priv);
@@ -374,10 +370,6 @@ int rsnd_adg_set_cmd_timsel_gen2(struct rsnd_mod *mod,
374/* 370/*
375 * R-Car sound priv 371 * R-Car sound priv
376 */ 372 */
377struct rsnd_of_data {
378 u32 flags;
379};
380
381struct rsnd_priv { 373struct rsnd_priv {
382 374
383 struct platform_device *pdev; 375 struct platform_device *pdev;
@@ -515,7 +507,6 @@ int rsnd_kctrl_new_e(struct rsnd_mod *mod,
515 * R-Car SSI 507 * R-Car SSI
516 */ 508 */
517int rsnd_ssi_probe(struct platform_device *pdev, 509int rsnd_ssi_probe(struct platform_device *pdev,
518 const struct rsnd_of_data *of_data,
519 struct rsnd_priv *priv); 510 struct rsnd_priv *priv);
520void rsnd_ssi_remove(struct platform_device *pdev, 511void rsnd_ssi_remove(struct platform_device *pdev,
521 struct rsnd_priv *priv); 512 struct rsnd_priv *priv);
@@ -536,7 +527,6 @@ int __rsnd_ssi_is_pin_sharing(struct rsnd_mod *mod);
536int rsnd_ssiu_attach(struct rsnd_dai_stream *io, 527int rsnd_ssiu_attach(struct rsnd_dai_stream *io,
537 struct rsnd_mod *mod); 528 struct rsnd_mod *mod);
538int rsnd_ssiu_probe(struct platform_device *pdev, 529int rsnd_ssiu_probe(struct platform_device *pdev,
539 const struct rsnd_of_data *of_data,
540 struct rsnd_priv *priv); 530 struct rsnd_priv *priv);
541void rsnd_ssiu_remove(struct platform_device *pdev, 531void rsnd_ssiu_remove(struct platform_device *pdev,
542 struct rsnd_priv *priv); 532 struct rsnd_priv *priv);
@@ -545,7 +535,6 @@ void rsnd_ssiu_remove(struct platform_device *pdev,
545 * R-Car SRC 535 * R-Car SRC
546 */ 536 */
547int rsnd_src_probe(struct platform_device *pdev, 537int rsnd_src_probe(struct platform_device *pdev,
548 const struct rsnd_of_data *of_data,
549 struct rsnd_priv *priv); 538 struct rsnd_priv *priv);
550void rsnd_src_remove(struct platform_device *pdev, 539void rsnd_src_remove(struct platform_device *pdev,
551 struct rsnd_priv *priv); 540 struct rsnd_priv *priv);
@@ -560,7 +549,6 @@ unsigned int rsnd_src_get_ssi_rate(struct rsnd_priv *priv,
560 * R-Car CTU 549 * R-Car CTU
561 */ 550 */
562int rsnd_ctu_probe(struct platform_device *pdev, 551int rsnd_ctu_probe(struct platform_device *pdev,
563 const struct rsnd_of_data *of_data,
564 struct rsnd_priv *priv); 552 struct rsnd_priv *priv);
565 553
566void rsnd_ctu_remove(struct platform_device *pdev, 554void rsnd_ctu_remove(struct platform_device *pdev,
@@ -573,7 +561,6 @@ struct rsnd_mod *rsnd_ctu_mod_get(struct rsnd_priv *priv, int id);
573 * R-Car MIX 561 * R-Car MIX
574 */ 562 */
575int rsnd_mix_probe(struct platform_device *pdev, 563int rsnd_mix_probe(struct platform_device *pdev,
576 const struct rsnd_of_data *of_data,
577 struct rsnd_priv *priv); 564 struct rsnd_priv *priv);
578 565
579void rsnd_mix_remove(struct platform_device *pdev, 566void rsnd_mix_remove(struct platform_device *pdev,
@@ -586,7 +573,6 @@ struct rsnd_mod *rsnd_mix_mod_get(struct rsnd_priv *priv, int id);
586 * R-Car DVC 573 * R-Car DVC
587 */ 574 */
588int rsnd_dvc_probe(struct platform_device *pdev, 575int rsnd_dvc_probe(struct platform_device *pdev,
589 const struct rsnd_of_data *of_data,
590 struct rsnd_priv *priv); 576 struct rsnd_priv *priv);
591void rsnd_dvc_remove(struct platform_device *pdev, 577void rsnd_dvc_remove(struct platform_device *pdev,
592 struct rsnd_priv *priv); 578 struct rsnd_priv *priv);
@@ -598,7 +584,6 @@ struct rsnd_mod *rsnd_dvc_mod_get(struct rsnd_priv *priv, int id);
598 * R-Car CMD 584 * R-Car CMD
599 */ 585 */
600int rsnd_cmd_probe(struct platform_device *pdev, 586int rsnd_cmd_probe(struct platform_device *pdev,
601 const struct rsnd_of_data *of_data,
602 struct rsnd_priv *priv); 587 struct rsnd_priv *priv);
603void rsnd_cmd_remove(struct platform_device *pdev, 588void rsnd_cmd_remove(struct platform_device *pdev,
604 struct rsnd_priv *priv); 589 struct rsnd_priv *priv);
diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
index f965fea7aa50..c0f7e2a4b688 100644
--- a/sound/soc/sh/rcar/src.c
+++ b/sound/soc/sh/rcar/src.c
@@ -554,7 +554,6 @@ struct rsnd_mod *rsnd_src_mod_get(struct rsnd_priv *priv, int id)
554} 554}
555 555
556int rsnd_src_probe(struct platform_device *pdev, 556int rsnd_src_probe(struct platform_device *pdev,
557 const struct rsnd_of_data *of_data,
558 struct rsnd_priv *priv) 557 struct rsnd_priv *priv)
559{ 558{
560 struct device_node *node; 559 struct device_node *node;
diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
index 1f1ecedabb5d..848c06436226 100644
--- a/sound/soc/sh/rcar/ssi.c
+++ b/sound/soc/sh/rcar/ssi.c
@@ -724,7 +724,6 @@ int __rsnd_ssi_is_pin_sharing(struct rsnd_mod *mod)
724} 724}
725 725
726int rsnd_ssi_probe(struct platform_device *pdev, 726int rsnd_ssi_probe(struct platform_device *pdev,
727 const struct rsnd_of_data *of_data,
728 struct rsnd_priv *priv) 727 struct rsnd_priv *priv)
729{ 728{
730 struct device_node *node; 729 struct device_node *node;
diff --git a/sound/soc/sh/rcar/ssiu.c b/sound/soc/sh/rcar/ssiu.c
index fc5ec17fe37e..89b1bc77cb8a 100644
--- a/sound/soc/sh/rcar/ssiu.c
+++ b/sound/soc/sh/rcar/ssiu.c
@@ -137,7 +137,6 @@ int rsnd_ssiu_attach(struct rsnd_dai_stream *io,
137} 137}
138 138
139int rsnd_ssiu_probe(struct platform_device *pdev, 139int rsnd_ssiu_probe(struct platform_device *pdev,
140 const struct rsnd_of_data *of_data,
141 struct rsnd_priv *priv) 140 struct rsnd_priv *priv)
142{ 141{
143 struct device *dev = rsnd_priv_to_dev(priv); 142 struct device *dev = rsnd_priv_to_dev(priv);