diff --git a/sound/soc/tegra-alt/include/tegra186_arad_alt.h b/sound/soc/tegra-alt/include/tegra186_arad_alt.h index 75c40e9c..55ca6020 100644 --- a/sound/soc/tegra-alt/include/tegra186_arad_alt.h +++ b/sound/soc/tegra-alt/include/tegra186_arad_alt.h @@ -1,7 +1,7 @@ /* * tegra186_arad_alt.h - Definitions for Tegra186 ARAD driver * - * Copyright (c) 2015-2017, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2015-2019, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -100,15 +100,8 @@ #define TEGRA186_ARAD_LANE_RATIO_INTEGER_PART_MASK 0xFFFFFFFF #define TEGRA186_ARAD_LANE_RATIO_FRAC_PART_MASK 0xFFFFFFFF -struct tegra186_arad_soc_data { - void (*set_audio_cif)(struct regmap *map, - unsigned int reg, - struct tegra210_xbar_cif_conf *conf); -}; - struct tegra186_arad { struct regmap *regmap; - const struct tegra186_arad_soc_data *soc_data; #if defined CONFIG_SND_SOC_TEGRA186_ARAD_WAR unsigned int int_status; spinlock_t status_lock; diff --git a/sound/soc/tegra-alt/include/tegra186_asrc_alt.h b/sound/soc/tegra-alt/include/tegra186_asrc_alt.h index 06808981..e95a3f8f 100644 --- a/sound/soc/tegra-alt/include/tegra186_asrc_alt.h +++ b/sound/soc/tegra-alt/include/tegra186_asrc_alt.h @@ -1,7 +1,7 @@ /* * tegra186_asrc_alt.h - Definitions for Tegra186 ASRC driver * - * Copyright (c) 2015-2017, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2015-2019, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -158,12 +158,6 @@ enum asrc_task_event { struct tegra210_xbar_cif_conf; -struct tegra186_asrc_soc_data { - void (*set_audio_cif)(struct regmap *map, - unsigned int reg, - struct tegra210_xbar_cif_conf *conf); -}; - struct tegra186_asrc_lane { unsigned int int_part; unsigned int frac_part; @@ -176,7 +170,6 @@ struct tegra186_asrc_lane { struct tegra186_asrc { struct regmap *regmap; struct tegra186_asrc_lane lane[6]; - const struct tegra186_asrc_soc_data *soc_data; struct tasklet_struct tasklet; struct list_head task_desc; int active_dai_count; diff --git a/sound/soc/tegra-alt/include/tegra186_dspk_alt.h b/sound/soc/tegra-alt/include/tegra186_dspk_alt.h index 61de823e..cab80257 100644 --- a/sound/soc/tegra-alt/include/tegra186_dspk_alt.h +++ b/sound/soc/tegra-alt/include/tegra186_dspk_alt.h @@ -171,17 +171,10 @@ #define TEGRA186_DSPK_RX_FIFO_DEPTH 4 -struct tegra186_dspk_soc_data { - void (*set_audio_cif) (struct regmap *map, - unsigned int reg, - struct tegra210_xbar_cif_conf *conf); -}; - struct tegra186_dspk { struct clk *clk_dspk; struct clk *clk_pll_a_out0; struct regmap *regmap; - const struct tegra186_dspk_soc_data *soc_data; struct pinctrl *pinctrl; struct pinctrl_state *pin_active_state; struct pinctrl_state *pin_idle_state; diff --git a/sound/soc/tegra-alt/include/tegra210_admaif_alt.h b/sound/soc/tegra-alt/include/tegra210_admaif_alt.h index 0285592a..775df6d1 100644 --- a/sound/soc/tegra-alt/include/tegra210_admaif_alt.h +++ b/sound/soc/tegra-alt/include/tegra210_admaif_alt.h @@ -161,9 +161,6 @@ struct tegra_admaif_soc_data { struct snd_soc_dai_driver *codec_dais; struct snd_soc_codec_driver *admaif_codec; const struct regmap_config *regmap_conf; - void (*set_audio_cif)(struct regmap *map, - unsigned int reg, - struct tegra210_xbar_cif_conf *cif_conf); bool is_isomgr_client; unsigned int global_base; unsigned int tx_base; diff --git a/sound/soc/tegra-alt/include/tegra210_adx_alt.h b/sound/soc/tegra-alt/include/tegra210_adx_alt.h index ccd092dc..475e92a1 100644 --- a/sound/soc/tegra-alt/include/tegra210_adx_alt.h +++ b/sound/soc/tegra-alt/include/tegra210_adx_alt.h @@ -160,19 +160,12 @@ enum { TEGRA210_ADX_TOTAL_STREAM }; -struct tegra210_adx_soc_data { - void (*set_audio_cif)(struct regmap *map, - unsigned int reg, - struct tegra210_xbar_cif_conf *conf); -}; - struct tegra210_adx { struct regmap *regmap; unsigned int map[TEGRA210_ADX_RAM_DEPTH]; unsigned int byte_mask[2]; int input_channels; int output_channels[TEGRA210_ADX_NUM_OUTPUTS]; - const struct tegra210_adx_soc_data *soc_data; bool is_shutdown; }; diff --git a/sound/soc/tegra-alt/include/tegra210_afc_alt.h b/sound/soc/tegra-alt/include/tegra210_afc_alt.h index ddf9098b..329b455d 100644 --- a/sound/soc/tegra-alt/include/tegra210_afc_alt.h +++ b/sound/soc/tegra-alt/include/tegra210_afc_alt.h @@ -1,7 +1,7 @@ /* * tegra210_afc_alt.h - Definitions for Tegra210 AFC driver * - * Copyright (c) 2014-2017 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2019 NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -84,9 +84,6 @@ #define AFC_CLK_PPM_DIFF 50 struct tegra210_afc_soc_data { - void (*set_audio_cif)(struct regmap *map, - unsigned int reg, - struct tegra210_xbar_cif_conf *conf); unsigned int num_i2s; bool flag_module_select; const struct snd_soc_codec_driver *afc_codec; diff --git a/sound/soc/tegra-alt/include/tegra210_amx_alt.h b/sound/soc/tegra-alt/include/tegra210_amx_alt.h index 0e347342..0b039ffd 100644 --- a/sound/soc/tegra-alt/include/tegra210_amx_alt.h +++ b/sound/soc/tegra-alt/include/tegra210_amx_alt.h @@ -1,7 +1,7 @@ /* * tegra210_amx_alt.h - Definitions for Tegra210 AMX driver * - * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2019, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -179,9 +179,6 @@ enum { }; struct tegra210_amx_soc_data { - void (*set_audio_cif)(struct regmap *map, - unsigned int reg, - struct tegra210_xbar_cif_conf *conf); bool is_auto_disable_supported; const struct regmap_config *regmap_conf; }; diff --git a/sound/soc/tegra-alt/include/tegra210_dmic_alt.h b/sound/soc/tegra-alt/include/tegra210_dmic_alt.h index a8a2cedc..c3b7e605 100644 --- a/sound/soc/tegra-alt/include/tegra210_dmic_alt.h +++ b/sound/soc/tegra-alt/include/tegra210_dmic_alt.h @@ -114,17 +114,11 @@ enum tegra_dmic_ch_select { DMIC_CH_SELECT_RIGHT, DMIC_CH_SELECT_STEREO, }; -struct tegra210_dmic_soc_data { - void (*set_audio_cif)(struct regmap *map, - unsigned int reg, - struct tegra210_xbar_cif_conf *conf); -}; struct tegra210_dmic { struct clk *clk_dmic; struct clk *clk_pll_a_out0; struct regmap *regmap; - const struct tegra210_dmic_soc_data *soc_data; struct pinctrl *pinctrl; struct pinctrl_state *pin_active_state; struct pinctrl_state *pin_idle_state; diff --git a/sound/soc/tegra-alt/include/tegra210_iqc_alt.h b/sound/soc/tegra-alt/include/tegra210_iqc_alt.h index b315564e..79b01708 100644 --- a/sound/soc/tegra-alt/include/tegra210_iqc_alt.h +++ b/sound/soc/tegra-alt/include/tegra210_iqc_alt.h @@ -1,7 +1,7 @@ /* * tegra210_iqc_alt.h - Definitions for Tegra210 IQC driver * - * Copyright (c) 2014-2017 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2019 NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -73,18 +73,11 @@ #define TEGRA210_IQC_DATA_OFFSET_SHIFT 0 #define TEGRA210_IQC_DATA_OFFSET_MASK (7 << TEGRA210_IQC_DATA_OFFSET_SHIFT) -struct tegra210_iqc_soc_data { - void (*set_audio_cif)(struct regmap *map, - unsigned int reg, - struct tegra210_xbar_cif_conf *conf); -}; - struct tegra210_iqc { struct clk *clk_iqc; struct regmap *regmap; unsigned int timestamp_enable; unsigned int data_offset; - const struct tegra210_iqc_soc_data *soc_data; }; #endif diff --git a/sound/soc/tegra-alt/include/tegra210_mixer_alt.h b/sound/soc/tegra-alt/include/tegra210_mixer_alt.h index d4c80d39..b8b54f92 100644 --- a/sound/soc/tegra-alt/include/tegra210_mixer_alt.h +++ b/sound/soc/tegra-alt/include/tegra210_mixer_alt.h @@ -1,7 +1,7 @@ /* * tegra210_mixer_alt.h - Definitions for Tegra210 MIXER driver * - * Copyright (c) 2015-2017, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2015-2019, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -120,17 +120,10 @@ #define TEGRA210_MIXER_TOTAL_PATH (TEGRA210_MIXER_AXBAR_RX_MAX + \ TEGRA210_MIXER_AXBAR_TX_MAX) -struct tegra210_mixer_soc_data { - void (*set_audio_cif)(struct regmap *map, - unsigned int reg, - struct tegra210_xbar_cif_conf *conf); -}; - struct tegra210_mixer { struct regmap *regmap; int gain_coeff[14]; int gain_value[TEGRA210_MIXER_AXBAR_RX_MAX]; - const struct tegra210_mixer_soc_data *soc_data; unsigned int channels_via_control[TEGRA210_MIXER_TOTAL_PATH]; bool is_shutdown; }; diff --git a/sound/soc/tegra-alt/include/tegra210_mvc_alt.h b/sound/soc/tegra-alt/include/tegra210_mvc_alt.h index 523ecd9f..be7df72a 100644 --- a/sound/soc/tegra-alt/include/tegra210_mvc_alt.h +++ b/sound/soc/tegra-alt/include/tegra210_mvc_alt.h @@ -1,7 +1,7 @@ /* * tegra210_mvc_alt.h - Definitions for Tegra210 MVC driver * - * Copyright (c) 2014-2017 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2019 NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -130,12 +130,6 @@ enum { CURVE_LINEAR, }; -struct tegra210_mvc_soc_data { - void (*set_audio_cif)(struct regmap *map, - unsigned int reg, - struct tegra210_xbar_cif_conf *conf); -}; - struct tegra210_mvc { struct regmap *regmap; int poly_coeff[9]; @@ -145,7 +139,6 @@ struct tegra210_mvc { unsigned int cif_channels; unsigned int audio_bits; unsigned int format_in; - const struct tegra210_mvc_soc_data *soc_data; bool is_shutdown; }; diff --git a/sound/soc/tegra-alt/include/tegra210_ope_alt.h b/sound/soc/tegra-alt/include/tegra210_ope_alt.h index a717e1a1..35062fab 100644 --- a/sound/soc/tegra-alt/include/tegra210_ope_alt.h +++ b/sound/soc/tegra-alt/include/tegra210_ope_alt.h @@ -1,7 +1,7 @@ /* * tegra210_ope_alt.h - Definitions for Tegra210 OPE driver * - * Copyright (c) 2014-2018 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2019 NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -77,9 +77,6 @@ struct tegra210_ope_module_soc_data { }; struct tegra210_ope_soc_data { - void (*set_audio_cif)(struct regmap *map, - unsigned int reg, - struct tegra210_xbar_cif_conf *conf); struct tegra210_ope_module_soc_data peq_soc_data; struct tegra210_ope_module_soc_data mbdrc_soc_data; }; diff --git a/sound/soc/tegra-alt/include/tegra210_sfc_alt.h b/sound/soc/tegra-alt/include/tegra210_sfc_alt.h index 818777c6..9e8f8bed 100644 --- a/sound/soc/tegra-alt/include/tegra210_sfc_alt.h +++ b/sound/soc/tegra-alt/include/tegra210_sfc_alt.h @@ -1,7 +1,7 @@ /* * tegra210_sfc_alt.h - Definitions for Tegra210 SFC driver * - * Copyright (c) 2014-2017 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2019 NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -92,12 +92,6 @@ /* SRC coefficients */ #define TEGRA210_SFC_COEF_RAM_DEPTH 64 -struct tegra210_sfc_soc_data { - void (*set_audio_cif)(struct regmap *map, - unsigned int reg, - struct tegra210_xbar_cif_conf *conf); -}; - struct tegra210_sfc { int srate_in; int srate_out; @@ -108,7 +102,6 @@ struct tegra210_sfc { struct snd_pcm_hw_params out_hw_params; int stereo_conv_input; int mono_conv_output; - const struct tegra210_sfc_soc_data *soc_data; unsigned int channels_via_control; bool is_shutdown; }; diff --git a/sound/soc/tegra-alt/include/tegra210_spdif_alt.h b/sound/soc/tegra-alt/include/tegra210_spdif_alt.h index 970af7dd..eebf922d 100644 --- a/sound/soc/tegra-alt/include/tegra210_spdif_alt.h +++ b/sound/soc/tegra-alt/include/tegra210_spdif_alt.h @@ -1,7 +1,7 @@ /* * tegra210_spdif.h - Definitions for Tegra210 SPDIF driver * - * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2019, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -245,12 +245,6 @@ #define TEGRA210_SPDIF_LCOEF_2_4_2_COEF_SHIFT 0 #define TEGRA210_SPDIF_LCOEF_2_4_2_COEF_MASK (0xffff << TEGRA210_SPDIF_LCOEF_2_4_2_COEF_SHIFT) -struct tegra210_spdif_soc_data { - void (*set_audio_cif)(struct regmap *map, - unsigned int reg, - struct tegra210_xbar_cif_conf *conf); -}; - struct tegra210_spdif { struct clk *clk_spdif_out; struct clk *clk_spdif_in; @@ -258,7 +252,6 @@ struct tegra210_spdif { struct clk *clk_pll_p_out0; struct regmap *regmap; unsigned int loopback; - const struct tegra210_spdif_soc_data *soc_data; int is_pinctrl; struct pinctrl *pinctrl; struct pinctrl_state *pin_active_state; diff --git a/sound/soc/tegra-alt/tegra186_arad_alt.c b/sound/soc/tegra-alt/tegra186_arad_alt.c index a6760d89..fa9fa233 100644 --- a/sound/soc/tegra-alt/tegra186_arad_alt.c +++ b/sound/soc/tegra-alt/tegra186_arad_alt.c @@ -35,7 +35,6 @@ #include #include "tegra186_asrc_alt.h" -#include "tegra210_xbar_alt.h" #include "tegra186_arad_alt.h" #define DRV_NAME "tegra186-arad" @@ -676,12 +675,8 @@ static const struct regmap_config tegra186_arad_regmap_config = { .cache_type = REGCACHE_FLAT, }; -static const struct tegra186_arad_soc_data soc_data_tegra186 = { - .set_audio_cif = tegra210_xbar_set_cif, -}; - static const struct of_device_id tegra186_arad_of_match[] = { - { .compatible = "nvidia,tegra186-arad", .data = &soc_data_tegra186 }, + { .compatible = "nvidia,tegra186-arad" }, {}, }; @@ -764,7 +759,6 @@ static int tegra186_arad_platform_probe(struct platform_device *pdev) void __iomem *regs; int ret = 0; const struct of_device_id *match; - struct tegra186_arad_soc_data *soc_data; match = of_match_device(tegra186_arad_of_match, &pdev->dev); if (!match) { @@ -772,7 +766,6 @@ static int tegra186_arad_platform_probe(struct platform_device *pdev) ret = -ENODEV; goto err; } - soc_data = (struct tegra186_arad_soc_data *)match->data; arad = devm_kzalloc(&pdev->dev, sizeof(struct tegra186_arad), GFP_KERNEL); @@ -783,7 +776,6 @@ static int tegra186_arad_platform_probe(struct platform_device *pdev) } arad_dev = &pdev->dev; - arad->soc_data = soc_data; dev_set_drvdata(&pdev->dev, arad); mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); diff --git a/sound/soc/tegra-alt/tegra186_asrc_alt.c b/sound/soc/tegra-alt/tegra186_asrc_alt.c index 02f5038f..a1fbb03e 100644 --- a/sound/soc/tegra-alt/tegra186_asrc_alt.c +++ b/sound/soc/tegra-alt/tegra186_asrc_alt.c @@ -255,7 +255,7 @@ static int tegra186_asrc_set_audio_cif(struct tegra186_asrc *asrc, cif_conf.client_channels = channels; cif_conf.audio_bits = audio_bits; cif_conf.client_bits = audio_bits; - asrc->soc_data->set_audio_cif(asrc->regmap, reg, &cif_conf); + tegra210_xbar_set_cif(asrc->regmap, reg, &cif_conf); return 0; } @@ -1088,12 +1088,8 @@ static void tegra186_asrc_ahc_cb(void *data) } #endif -static const struct tegra186_asrc_soc_data soc_data_tegra186 = { - .set_audio_cif = tegra210_xbar_set_cif, -}; - static const struct of_device_id tegra186_asrc_of_match[] = { - { .compatible = "nvidia,tegra186-asrc", .data = &soc_data_tegra186 }, + { .compatible = "nvidia,tegra186-asrc" }, {}, }; static int tegra186_asrc_platform_probe(struct platform_device *pdev) @@ -1103,7 +1099,6 @@ static int tegra186_asrc_platform_probe(struct platform_device *pdev) void __iomem *regs; int ret = 0; const struct of_device_id *match; - struct tegra186_asrc_soc_data *soc_data; unsigned int i = 0; match = of_match_device(tegra186_asrc_of_match, &pdev->dev); @@ -1112,7 +1107,6 @@ static int tegra186_asrc_platform_probe(struct platform_device *pdev) ret = -ENODEV; goto err; } - soc_data = (struct tegra186_asrc_soc_data *)match->data; asrc_dev = &pdev->dev; asrc = devm_kzalloc(&pdev->dev, sizeof(struct tegra186_asrc), GFP_KERNEL); @@ -1122,7 +1116,6 @@ static int tegra186_asrc_platform_probe(struct platform_device *pdev) goto err; } - asrc->soc_data = soc_data; asrc->is_shutdown = false; dev_set_drvdata(&pdev->dev, asrc); diff --git a/sound/soc/tegra-alt/tegra186_dspk_alt.c b/sound/soc/tegra-alt/tegra186_dspk_alt.c index 784e26e9..3ad75d00 100644 --- a/sound/soc/tegra-alt/tegra186_dspk_alt.c +++ b/sound/soc/tegra-alt/tegra186_dspk_alt.c @@ -160,9 +160,8 @@ static int tegra186_dspk_set_audio_cif(struct tegra186_dspk *dspk, return -EINVAL; } - dspk->soc_data->set_audio_cif(dspk->regmap, - TEGRA186_DSPK_AXBAR_RX_CIF_CTRL, - &cif_conf); + tegra210_xbar_set_cif(dspk->regmap, TEGRA186_DSPK_AXBAR_RX_CIF_CTRL, + &cif_conf); return 0; } @@ -458,12 +457,8 @@ static const struct regmap_config tegra186_dspk_regmap_config = { .cache_type = REGCACHE_FLAT, }; -static const struct tegra186_dspk_soc_data soc_data_tegra186 = { - .set_audio_cif = tegra210_xbar_set_cif, -}; - static const struct of_device_id tegra186_dspk_of_match[] = { - { .compatible = "nvidia,tegra186-dspk", .data = &soc_data_tegra186 }, + { .compatible = "nvidia,tegra186-dspk" }, {}, }; @@ -475,7 +470,6 @@ static int tegra186_dspk_platform_probe(struct platform_device *pdev) void __iomem *regs; int ret = 0; const struct of_device_id *match; - struct tegra186_dspk_soc_data *soc_data; match = of_match_device(tegra186_dspk_of_match, &pdev->dev); if (!match) { @@ -483,7 +477,6 @@ static int tegra186_dspk_platform_probe(struct platform_device *pdev) ret = -ENODEV; goto err; } - soc_data = (struct tegra186_dspk_soc_data *)match->data; dspk = devm_kzalloc(&pdev->dev, sizeof(struct tegra186_dspk), GFP_KERNEL); @@ -493,7 +486,6 @@ static int tegra186_dspk_platform_probe(struct platform_device *pdev) goto err; } - dspk->soc_data = soc_data; dspk->is_shutdown = false; dspk->prod_name = NULL; diff --git a/sound/soc/tegra-alt/tegra210_admaif_alt.c b/sound/soc/tegra-alt/tegra210_admaif_alt.c index 5df13d71..c06397ef 100644 --- a/sound/soc/tegra-alt/tegra210_admaif_alt.c +++ b/sound/soc/tegra-alt/tegra210_admaif_alt.c @@ -445,7 +445,7 @@ static int tegra_admaif_hw_params(struct snd_pcm_substream *substream, } tegra_admaif_set_pack_mode(admaif->regmap, reg, valid_bit); - admaif->soc_data->set_audio_cif(admaif->regmap, reg, &cif_conf); + tegra210_xbar_set_cif(admaif->regmap, reg, &cif_conf); return 0; } @@ -1115,7 +1115,6 @@ static struct tegra_admaif_soc_data soc_data_tegra210 = { .admaif_codec = &tegra210_admaif_codec, .codec_dais = tegra210_admaif_codec_dais, .regmap_conf = &tegra210_admaif_regmap_config, - .set_audio_cif = tegra210_xbar_set_cif, .global_base = TEGRA210_ADMAIF_GLOBAL_BASE, .tx_base = TEGRA210_ADMAIF_XBAR_TX_BASE, .rx_base = TEGRA210_ADMAIF_XBAR_RX_BASE, @@ -1127,7 +1126,6 @@ static struct tegra_admaif_soc_data soc_data_tegra186 = { .admaif_codec = &tegra186_admaif_codec, .codec_dais = tegra186_admaif_codec_dais, .regmap_conf = &tegra186_admaif_regmap_config, - .set_audio_cif = tegra210_xbar_set_cif, .global_base = TEGRA186_ADMAIF_GLOBAL_BASE, .tx_base = TEGRA186_ADMAIF_XBAR_TX_BASE, .rx_base = TEGRA186_ADMAIF_XBAR_RX_BASE, diff --git a/sound/soc/tegra-alt/tegra210_adx_alt.c b/sound/soc/tegra-alt/tegra210_adx_alt.c index 328a49ea..48df5b96 100644 --- a/sound/soc/tegra-alt/tegra210_adx_alt.c +++ b/sound/soc/tegra-alt/tegra210_adx_alt.c @@ -304,7 +304,7 @@ static int tegra210_adx_set_audio_cif(struct snd_soc_dai *dai, cif_conf.audio_bits = audio_bits; cif_conf.client_bits = audio_bits; - adx->soc_data->set_audio_cif(adx->regmap, reg, &cif_conf); + tegra210_xbar_set_cif(adx->regmap, reg, &cif_conf); return 0; } @@ -799,12 +799,8 @@ static const struct regmap_config tegra210_adx_regmap_config = { .cache_type = REGCACHE_FLAT, }; -static const struct tegra210_adx_soc_data soc_data_tegra210 = { - .set_audio_cif = tegra210_xbar_set_cif -}; - static const struct of_device_id tegra210_adx_of_match[] = { - { .compatible = "nvidia,tegra210-adx", .data = &soc_data_tegra210 }, + { .compatible = "nvidia,tegra210-adx" }, {}, }; @@ -815,7 +811,6 @@ static int tegra210_adx_platform_probe(struct platform_device *pdev) void __iomem *regs; int ret = 0; const struct of_device_id *match; - struct tegra210_adx_soc_data *soc_data; match = of_match_device(tegra210_adx_of_match, &pdev->dev); if (!match) { @@ -823,7 +818,6 @@ static int tegra210_adx_platform_probe(struct platform_device *pdev) ret = -ENODEV; goto err; } - soc_data = (struct tegra210_adx_soc_data *)match->data; adx = devm_kzalloc(&pdev->dev, sizeof(struct tegra210_adx), GFP_KERNEL); if (!adx) { @@ -832,7 +826,6 @@ static int tegra210_adx_platform_probe(struct platform_device *pdev) goto err; } - adx->soc_data = soc_data; adx->is_shutdown = false; dev_set_drvdata(&pdev->dev, adx); diff --git a/sound/soc/tegra-alt/tegra210_afc_alt.c b/sound/soc/tegra-alt/tegra210_afc_alt.c index 36713dc4..1dba5685 100644 --- a/sound/soc/tegra-alt/tegra210_afc_alt.c +++ b/sound/soc/tegra-alt/tegra210_afc_alt.c @@ -325,7 +325,7 @@ static int tegra210_afc_set_audio_cif(struct tegra210_afc *afc, cif_conf.audio_bits = audio_bits; cif_conf.client_bits = audio_bits; - afc->soc_data->set_audio_cif(afc->regmap, reg, &cif_conf); + tegra210_xbar_set_cif(afc->regmap, reg, &cif_conf); return 0; } @@ -503,14 +503,12 @@ static const struct regmap_config tegra210_afc_regmap_config = { }; static const struct tegra210_afc_soc_data soc_data_tegra210 = { - .set_audio_cif = tegra210_xbar_set_cif, .afc_codec = &tegra210_afc_codec, .num_i2s = 5, .flag_module_select = false, }; static const struct tegra210_afc_soc_data soc_data_tegra186 = { - .set_audio_cif = tegra210_xbar_set_cif, .afc_codec = &tegra186_afc_codec, .num_i2s = 6, .flag_module_select = true, diff --git a/sound/soc/tegra-alt/tegra210_amx_alt.c b/sound/soc/tegra-alt/tegra210_amx_alt.c index ffdbb224..7a2143e8 100644 --- a/sound/soc/tegra-alt/tegra210_amx_alt.c +++ b/sound/soc/tegra-alt/tegra210_amx_alt.c @@ -341,7 +341,7 @@ static int tegra210_amx_set_audio_cif(struct snd_soc_dai *dai, cif_conf.audio_bits = audio_bits; cif_conf.client_bits = audio_bits; - amx->soc_data->set_audio_cif(amx->regmap, reg, &cif_conf); + tegra210_xbar_set_cif(amx->regmap, reg, &cif_conf); return 0; } @@ -869,13 +869,11 @@ static const struct regmap_config tegra194_amx_regmap_config = { }; static const struct tegra210_amx_soc_data soc_data_tegra210 = { - .set_audio_cif = tegra210_xbar_set_cif, .regmap_conf = &tegra210_amx_regmap_config, .is_auto_disable_supported = false, }; static const struct tegra210_amx_soc_data soc_data_tegra194 = { - .set_audio_cif = tegra210_xbar_set_cif, .regmap_conf = &tegra194_amx_regmap_config, .is_auto_disable_supported = true, }; diff --git a/sound/soc/tegra-alt/tegra210_dmic_alt.c b/sound/soc/tegra-alt/tegra210_dmic_alt.c index fdc91447..3637297a 100644 --- a/sound/soc/tegra-alt/tegra210_dmic_alt.c +++ b/sound/soc/tegra-alt/tegra210_dmic_alt.c @@ -401,8 +401,8 @@ static int tegra210_dmic_hw_params(struct snd_pcm_substream *substream, cif_conf.client_bits = TEGRA210_AUDIOCIF_BITS_24; - dmic->soc_data->set_audio_cif(dmic->regmap, TEGRA210_DMIC_TX_CIF_CTRL, - &cif_conf); + tegra210_xbar_set_cif(dmic->regmap, TEGRA210_DMIC_TX_CIF_CTRL, + &cif_conf); return 0; } @@ -671,12 +671,8 @@ static const struct regmap_config tegra210_dmic_regmap_config = { .cache_type = REGCACHE_FLAT, }; -static const struct tegra210_dmic_soc_data soc_data_tegra210 = { - .set_audio_cif = tegra210_xbar_set_cif, -}; - static const struct of_device_id tegra210_dmic_of_match[] = { - { .compatible = "nvidia,tegra210-dmic", .data = &soc_data_tegra210 }, + { .compatible = "nvidia,tegra210-dmic" }, {}, }; @@ -688,7 +684,6 @@ static int tegra210_dmic_platform_probe(struct platform_device *pdev) void __iomem *regs; int ret = 0; const struct of_device_id *match; - struct tegra210_dmic_soc_data *soc_data; match = of_match_device(tegra210_dmic_of_match, &pdev->dev); if (!match) { @@ -696,7 +691,6 @@ static int tegra210_dmic_platform_probe(struct platform_device *pdev) ret = -ENODEV; goto err; } - soc_data = (struct tegra210_dmic_soc_data *)match->data; dmic = devm_kzalloc(&pdev->dev, sizeof(struct tegra210_dmic), GFP_KERNEL); if (!dmic) { @@ -705,7 +699,6 @@ static int tegra210_dmic_platform_probe(struct platform_device *pdev) goto err; } - dmic->soc_data = soc_data; dmic->is_shutdown = false; dmic->prod_name = NULL; dev_set_drvdata(&pdev->dev, dmic); diff --git a/sound/soc/tegra-alt/tegra210_iqc_alt.c b/sound/soc/tegra-alt/tegra210_iqc_alt.c index efe359c2..8c88086e 100644 --- a/sound/soc/tegra-alt/tegra210_iqc_alt.c +++ b/sound/soc/tegra-alt/tegra210_iqc_alt.c @@ -106,7 +106,7 @@ static int tegra210_iqc_set_audio_cif(struct tegra210_iqc *iqc, cif_conf.audio_bits = audio_bits; cif_conf.client_bits = audio_bits; - iqc->soc_data->set_audio_cif(iqc->regmap, reg, &cif_conf); + tegra210_xbar_set_cif(iqc->regmap, reg, &cif_conf); return 0; } @@ -295,12 +295,8 @@ static const struct regmap_config tegra210_iqc_regmap_config = { .cache_type = REGCACHE_FLAT, }; -static const struct tegra210_iqc_soc_data soc_data_tegra210 = { - .set_audio_cif = tegra210_xbar_set_cif, -}; - static const struct of_device_id tegra210_iqc_of_match[] = { - { .compatible = "nvidia,tegra210-iqc", .data = &soc_data_tegra210 }, + { .compatible = "nvidia,tegra210-iqc" }, {}, }; @@ -311,7 +307,6 @@ static int tegra210_iqc_platform_probe(struct platform_device *pdev) void __iomem *regs; int ret = 0; const struct of_device_id *match; - struct tegra210_iqc_soc_data *soc_data; match = of_match_device(tegra210_iqc_of_match, &pdev->dev); if (!match) { @@ -319,7 +314,6 @@ static int tegra210_iqc_platform_probe(struct platform_device *pdev) ret = -ENODEV; goto err; } - soc_data = (struct tegra210_iqc_soc_data *)match->data; iqc = devm_kzalloc(&pdev->dev, sizeof(struct tegra210_iqc), GFP_KERNEL); if (!iqc) { @@ -328,7 +322,6 @@ static int tegra210_iqc_platform_probe(struct platform_device *pdev) goto err; } - iqc->soc_data = soc_data; dev_set_drvdata(&pdev->dev, iqc); if (!(tegra_platform_is_unit_fpga() || tegra_platform_is_fpga())) { diff --git a/sound/soc/tegra-alt/tegra210_mixer_alt.c b/sound/soc/tegra-alt/tegra210_mixer_alt.c index b7f0a4cb..1edfdb66 100644 --- a/sound/soc/tegra-alt/tegra210_mixer_alt.c +++ b/sound/soc/tegra-alt/tegra210_mixer_alt.c @@ -248,7 +248,7 @@ static int tegra210_mixer_set_audio_cif(struct tegra210_mixer *mixer, cif_conf.audio_bits = audio_bits; cif_conf.client_bits = audio_bits; - mixer->soc_data->set_audio_cif(mixer->regmap, reg, &cif_conf); + tegra210_xbar_set_cif(mixer->regmap, reg, &cif_conf); return 0; } @@ -682,12 +682,8 @@ static const struct regmap_config tegra210_mixer_regmap_config = { .cache_type = REGCACHE_FLAT, }; -static const struct tegra210_mixer_soc_data soc_data_tegra210 = { - .set_audio_cif = tegra210_xbar_set_cif -}; - static const struct of_device_id tegra210_mixer_of_match[] = { - { .compatible = "nvidia,tegra210-amixer", .data = &soc_data_tegra210 }, + { .compatible = "nvidia,tegra210-amixer" }, {}, }; @@ -698,7 +694,6 @@ static int tegra210_mixer_platform_probe(struct platform_device *pdev) void __iomem *regs; int ret, i; const struct of_device_id *match; - struct tegra210_mixer_soc_data *soc_data; match = of_match_device(tegra210_mixer_of_match, &pdev->dev); if (!match) { @@ -706,7 +701,6 @@ static int tegra210_mixer_platform_probe(struct platform_device *pdev) ret = -ENODEV; goto err; } - soc_data = (struct tegra210_mixer_soc_data *)match->data; mixer = devm_kzalloc(&pdev->dev, sizeof(struct tegra210_mixer), GFP_KERNEL); @@ -716,7 +710,6 @@ static int tegra210_mixer_platform_probe(struct platform_device *pdev) goto err; } - mixer->soc_data = soc_data; mixer->is_shutdown = false; mixer->gain_coeff[0] = 0; mixer->gain_coeff[1] = 0; diff --git a/sound/soc/tegra-alt/tegra210_mvc_alt.c b/sound/soc/tegra-alt/tegra210_mvc_alt.c index 1b08314c..c949a992 100644 --- a/sound/soc/tegra-alt/tegra210_mvc_alt.c +++ b/sound/soc/tegra-alt/tegra210_mvc_alt.c @@ -369,7 +369,7 @@ static int tegra210_mvc_set_audio_cif(struct tegra210_mvc *mvc, if (mvc->format_in && (reg == TEGRA210_MVC_AXBAR_RX_CIF_CTRL)) cif_conf.audio_bits = tegra210_mvc_fmt_values[mvc->format_in]; - mvc->soc_data->set_audio_cif(mvc->regmap, reg, &cif_conf); + tegra210_xbar_set_cif(mvc->regmap, reg, &cif_conf); return 0; } @@ -621,12 +621,8 @@ static const struct regmap_config tegra210_mvc_regmap_config = { .cache_type = REGCACHE_FLAT, }; -static const struct tegra210_mvc_soc_data soc_data_tegra210 = { - .set_audio_cif = tegra210_xbar_set_cif, -}; - static const struct of_device_id tegra210_mvc_of_match[] = { - { .compatible = "nvidia,tegra210-mvc", .data = &soc_data_tegra210 }, + { .compatible = "nvidia,tegra210-mvc" }, {}, }; @@ -637,7 +633,6 @@ static int tegra210_mvc_platform_probe(struct platform_device *pdev) void __iomem *regs; int ret = 0; const struct of_device_id *match; - struct tegra210_mvc_soc_data *soc_data; match = of_match_device(tegra210_mvc_of_match, &pdev->dev); if (!match) { @@ -645,7 +640,6 @@ static int tegra210_mvc_platform_probe(struct platform_device *pdev) ret = -ENODEV; goto err; } - soc_data = (struct tegra210_mvc_soc_data *)match->data; mvc = devm_kzalloc(&pdev->dev, sizeof(struct tegra210_mvc), GFP_KERNEL); if (!mvc) { @@ -654,7 +648,6 @@ static int tegra210_mvc_platform_probe(struct platform_device *pdev) goto err; } - mvc->soc_data = soc_data; mvc->is_shutdown = false; dev_set_drvdata(&pdev->dev, mvc); diff --git a/sound/soc/tegra-alt/tegra210_ope_alt.c b/sound/soc/tegra-alt/tegra210_ope_alt.c index 4c49745a..380e7d4f 100644 --- a/sound/soc/tegra-alt/tegra210_ope_alt.c +++ b/sound/soc/tegra-alt/tegra210_ope_alt.c @@ -109,7 +109,7 @@ static int tegra210_ope_set_audio_cif(struct tegra210_ope *ope, cif_conf.audio_bits = audio_bits; cif_conf.client_bits = audio_bits; - ope->soc_data->set_audio_cif(ope->regmap, reg, &cif_conf); + tegra210_xbar_set_cif(ope->regmap, reg, &cif_conf); return 0; } @@ -313,7 +313,6 @@ static const struct regmap_config tegra210_ope_regmap_config = { }; static const struct tegra210_ope_soc_data soc_data_tegra210 = { - .set_audio_cif = tegra210_xbar_set_cif, .peq_soc_data = { .init = tegra210_peq_init, .codec_init = tegra210_peq_codec_init, diff --git a/sound/soc/tegra-alt/tegra210_sfc_alt.c b/sound/soc/tegra-alt/tegra210_sfc_alt.c index 41d31eda..02422f18 100644 --- a/sound/soc/tegra-alt/tegra210_sfc_alt.c +++ b/sound/soc/tegra-alt/tegra210_sfc_alt.c @@ -322,7 +322,7 @@ static int tegra210_sfc_set_audio_cif(struct tegra210_sfc *sfc, cif_conf.audio_bits = tegra210_sfc_fmt_values[sfc->format_out]; cif_conf.client_bits = TEGRA210_AUDIOCIF_BITS_32; - sfc->soc_data->set_audio_cif(sfc->regmap, reg, &cif_conf); + tegra210_xbar_set_cif(sfc->regmap, reg, &cif_conf); return 0; } @@ -842,12 +842,8 @@ static const struct regmap_config tegra210_sfc_regmap_config = { .cache_type = REGCACHE_FLAT, }; -static const struct tegra210_sfc_soc_data soc_data_tegra210 = { - .set_audio_cif = tegra210_xbar_set_cif, -}; - static const struct of_device_id tegra210_sfc_of_match[] = { - { .compatible = "nvidia,tegra210-sfc", .data = &soc_data_tegra210 }, + { .compatible = "nvidia,tegra210-sfc" }, {}, }; @@ -858,7 +854,6 @@ static int tegra210_sfc_platform_probe(struct platform_device *pdev) void __iomem *regs; int ret = 0; const struct of_device_id *match; - struct tegra210_sfc_soc_data *soc_data; match = of_match_device(tegra210_sfc_of_match, &pdev->dev); if (!match) { @@ -866,7 +861,6 @@ static int tegra210_sfc_platform_probe(struct platform_device *pdev) ret = -ENODEV; goto err; } - soc_data = (struct tegra210_sfc_soc_data *)match->data; sfc = devm_kzalloc(&pdev->dev, sizeof(struct tegra210_sfc), GFP_KERNEL); if (!sfc) { @@ -875,7 +869,6 @@ static int tegra210_sfc_platform_probe(struct platform_device *pdev) goto err; } - sfc->soc_data = soc_data; sfc->is_shutdown = false; /* initialize default output srate */ diff --git a/sound/soc/tegra-alt/tegra210_spdif_alt.c b/sound/soc/tegra-alt/tegra210_spdif_alt.c index 6ceacb91..549f39c5 100644 --- a/sound/soc/tegra-alt/tegra210_spdif_alt.c +++ b/sound/soc/tegra-alt/tegra210_spdif_alt.c @@ -235,13 +235,13 @@ static int tegra210_spdif_hw_params(struct snd_pcm_substream *substream, /* As a CODEC DAI, CAPTURE is transmit */ if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { - spdif->soc_data->set_audio_cif(spdif->regmap, - TEGRA210_SPDIF_CIF_TXD_CTRL, - &cif_conf); + tegra210_xbar_set_cif(spdif->regmap, + TEGRA210_SPDIF_CIF_TXD_CTRL, + &cif_conf); } else { - spdif->soc_data->set_audio_cif(spdif->regmap, - TEGRA210_SPDIF_CIF_RXD_CTRL, - &cif_conf); + tegra210_xbar_set_cif(spdif->regmap, + TEGRA210_SPDIF_CIF_RXD_CTRL, + &cif_conf); } return 0; @@ -423,12 +423,8 @@ static const struct regmap_config tegra210_spdif_regmap_config = { .cache_type = REGCACHE_FLAT, }; -static const struct tegra210_spdif_soc_data soc_data_tegra210 = { - .set_audio_cif = tegra210_xbar_set_cif, -}; - static const struct of_device_id tegra210_spdif_of_match[] = { - { .compatible = "nvidia,tegra210-spdif", .data = &soc_data_tegra210 }, + { .compatible = "nvidia,tegra210-spdif" }, {}, }; @@ -439,7 +435,6 @@ static int tegra210_spdif_platform_probe(struct platform_device *pdev) struct resource *mem, *memregion; void __iomem *regs; const struct of_device_id *match; - struct tegra210_spdif_soc_data *soc_data; const char *prod_name; int ret; @@ -449,7 +444,6 @@ static int tegra210_spdif_platform_probe(struct platform_device *pdev) ret = -ENODEV; goto err; } - soc_data = (struct tegra210_spdif_soc_data *)match->data; spdif = devm_kzalloc(&pdev->dev, sizeof(struct tegra210_spdif), GFP_KERNEL); @@ -459,7 +453,6 @@ static int tegra210_spdif_platform_probe(struct platform_device *pdev) goto err; } - spdif->soc_data = soc_data; spdif->is_shutdown = false; dev_set_drvdata(&pdev->dev, spdif);