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>
}
int rsnd_adg_probe(struct platform_device *pdev,
- const struct rsnd_of_data *of_data,
struct rsnd_priv *priv)
{
struct rsnd_adg *adg;
}
int rsnd_cmd_probe(struct platform_device *pdev,
- const struct rsnd_of_data *of_data,
struct rsnd_priv *priv)
{
struct device *dev = rsnd_priv_to_dev(priv);
#define RSND_RATES SNDRV_PCM_RATE_8000_96000
#define RSND_FMTS (SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S16_LE)
-static const struct rsnd_of_data rsnd_of_data_gen1 = {
- .flags = RSND_GEN1,
-};
-
-static const struct rsnd_of_data rsnd_of_data_gen2 = {
- .flags = RSND_GEN2,
-};
-
static const struct of_device_id rsnd_of_match[] = {
- { .compatible = "renesas,rcar_sound-gen1", .data = &rsnd_of_data_gen1 },
- { .compatible = "renesas,rcar_sound-gen2", .data = &rsnd_of_data_gen2 },
- { .compatible = "renesas,rcar_sound-gen3", .data = &rsnd_of_data_gen2 }, /* gen2 compatible */
+ { .compatible = "renesas,rcar_sound-gen1", .data = (void *)RSND_GEN1 },
+ { .compatible = "renesas,rcar_sound-gen2", .data = (void *)RSND_GEN2 },
+ { .compatible = "renesas,rcar_sound-gen3", .data = (void *)RSND_GEN2 }, /* gen2 compatible */
{},
};
MODULE_DEVICE_TABLE(of, rsnd_of_match);
};
static int rsnd_dai_probe(struct platform_device *pdev,
- const struct rsnd_of_data *of_data,
struct rsnd_priv *priv)
{
struct device_node *dai_node;
int nr, dai_i, io_i, np_i;
int ret;
- if (!of_data)
- return 0;
-
dai_node = rsnd_dai_of_node(priv);
nr = of_get_child_count(dai_node);
if (!nr) {
struct device *dev = &pdev->dev;
struct rsnd_dai *rdai;
const struct of_device_id *of_id = of_match_device(rsnd_of_match, dev);
- const struct rsnd_of_data *of_data;
int (*probe_func[])(struct platform_device *pdev,
- const struct rsnd_of_data *of_data,
struct rsnd_priv *priv) = {
rsnd_gen_probe,
rsnd_dma_probe,
GFP_KERNEL);
if (!info)
return -ENOMEM;
- of_data = of_id->data;
/*
* init priv data
priv->pdev = pdev;
priv->info = info;
- priv->flags = of_data->flags;
+ priv->flags = (u32)of_id->data;
spin_lock_init(&priv->lock);
/*
* init each module
*/
for (i = 0; i < ARRAY_SIZE(probe_func); i++) {
- ret = probe_func[i](pdev, of_data, priv);
+ ret = probe_func[i](pdev, priv);
if (ret)
return ret;
}
}
int rsnd_ctu_probe(struct platform_device *pdev,
- const struct rsnd_of_data *of_data,
struct rsnd_priv *priv)
{
struct device_node *node;
}
int rsnd_dma_probe(struct platform_device *pdev,
- const struct rsnd_of_data *of_data,
struct rsnd_priv *priv)
{
struct device *dev = rsnd_priv_to_dev(priv);
}
int rsnd_dvc_probe(struct platform_device *pdev,
- const struct rsnd_of_data *of_data,
struct rsnd_priv *priv)
{
struct device_node *node;
* Gen
*/
int rsnd_gen_probe(struct platform_device *pdev,
- const struct rsnd_of_data *of_data,
struct rsnd_priv *priv)
{
struct device *dev = rsnd_priv_to_dev(priv);
}
int rsnd_mix_probe(struct platform_device *pdev,
- const struct rsnd_of_data *of_data,
struct rsnd_priv *priv)
{
struct device_node *node;
RSND_REG_MAX,
};
-struct rsnd_of_data;
struct rsnd_priv;
struct rsnd_mod;
struct rsnd_dai;
struct rsnd_mod *rsnd_dma_attach(struct rsnd_dai_stream *io,
struct rsnd_mod *mod, int id);
int rsnd_dma_probe(struct platform_device *pdev,
- const struct rsnd_of_data *of_data,
struct rsnd_priv *priv);
struct dma_chan *rsnd_dma_request_channel(struct device_node *of_node,
struct rsnd_mod *mod, char *name);
* R-Car Gen1/Gen2
*/
int rsnd_gen_probe(struct platform_device *pdev,
- const struct rsnd_of_data *of_data,
struct rsnd_priv *priv);
void __iomem *rsnd_gen_reg_get(struct rsnd_priv *priv,
struct rsnd_mod *mod,
int rsnd_adg_ssi_clk_stop(struct rsnd_mod *mod);
int rsnd_adg_ssi_clk_try_start(struct rsnd_mod *mod, unsigned int rate);
int rsnd_adg_probe(struct platform_device *pdev,
- const struct rsnd_of_data *of_data,
struct rsnd_priv *priv);
void rsnd_adg_remove(struct platform_device *pdev,
struct rsnd_priv *priv);
/*
* R-Car sound priv
*/
-struct rsnd_of_data {
- u32 flags;
-};
-
struct rsnd_priv {
struct platform_device *pdev;
* R-Car SSI
*/
int rsnd_ssi_probe(struct platform_device *pdev,
- const struct rsnd_of_data *of_data,
struct rsnd_priv *priv);
void rsnd_ssi_remove(struct platform_device *pdev,
struct rsnd_priv *priv);
int rsnd_ssiu_attach(struct rsnd_dai_stream *io,
struct rsnd_mod *mod);
int rsnd_ssiu_probe(struct platform_device *pdev,
- const struct rsnd_of_data *of_data,
struct rsnd_priv *priv);
void rsnd_ssiu_remove(struct platform_device *pdev,
struct rsnd_priv *priv);
* R-Car SRC
*/
int rsnd_src_probe(struct platform_device *pdev,
- const struct rsnd_of_data *of_data,
struct rsnd_priv *priv);
void rsnd_src_remove(struct platform_device *pdev,
struct rsnd_priv *priv);
* R-Car CTU
*/
int rsnd_ctu_probe(struct platform_device *pdev,
- const struct rsnd_of_data *of_data,
struct rsnd_priv *priv);
void rsnd_ctu_remove(struct platform_device *pdev,
* R-Car MIX
*/
int rsnd_mix_probe(struct platform_device *pdev,
- const struct rsnd_of_data *of_data,
struct rsnd_priv *priv);
void rsnd_mix_remove(struct platform_device *pdev,
* R-Car DVC
*/
int rsnd_dvc_probe(struct platform_device *pdev,
- const struct rsnd_of_data *of_data,
struct rsnd_priv *priv);
void rsnd_dvc_remove(struct platform_device *pdev,
struct rsnd_priv *priv);
* R-Car CMD
*/
int rsnd_cmd_probe(struct platform_device *pdev,
- const struct rsnd_of_data *of_data,
struct rsnd_priv *priv);
void rsnd_cmd_remove(struct platform_device *pdev,
struct rsnd_priv *priv);
}
int rsnd_src_probe(struct platform_device *pdev,
- const struct rsnd_of_data *of_data,
struct rsnd_priv *priv)
{
struct device_node *node;
}
int rsnd_ssi_probe(struct platform_device *pdev,
- const struct rsnd_of_data *of_data,
struct rsnd_priv *priv)
{
struct device_node *node;
}
int rsnd_ssiu_probe(struct platform_device *pdev,
- const struct rsnd_of_data *of_data,
struct rsnd_priv *priv)
{
struct device *dev = rsnd_priv_to_dev(priv);