From 14ccf06582fc9c49b88874159ac12f03fa382cd5 Mon Sep 17 00:00:00 2001 From: Asha Talambedu Date: Thu, 7 Nov 2019 12:41:53 +0530 Subject: [PATCH] ASoC: tegra-alt: ASRC_INT_CLEAR_WAR config cleanup - CONFIG_TEGRA186_ASRC_INT_CLEAR_WAR is removed. - Int clear war is disabled for platforms >= t194 as the related h/w issue is resolved with the help of compatible string match Bug 200540133 Change-Id: I48677f17278f0451c67fa2b9232b9e960bf8a34f Signed-off-by: Asha Talambedu Reviewed-on: https://git-master.nvidia.com/r/2233940 Reviewed-by: mobile promotions Tested-by: mobile promotions --- sound/soc/tegra-alt/Kconfig | 4 ---- sound/soc/tegra-alt/tegra186_asrc_alt.c | 26 +++++++++++++++---------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/sound/soc/tegra-alt/Kconfig b/sound/soc/tegra-alt/Kconfig index 759dfe97..eed57b8e 100644 --- a/sound/soc/tegra-alt/Kconfig +++ b/sound/soc/tegra-alt/Kconfig @@ -41,10 +41,6 @@ config SND_SOC_TEGRA186_ASRC_WAR depends on SND_SOC_TEGRA186_ASRC_ALT depends on SND_SOC_TEGRA186_ARAD_WAR -config TEGRA186_ASRC_INT_CLEAR_WAR - def_bool y - depends on SND_SOC_TEGRA186_ASRC_ALT - config SND_SOC_TEGRA_ALT tristate "Alternative DAPM-based SoC audio support for the Tegra System-on-Chip" depends on ARCH_TEGRA diff --git a/sound/soc/tegra-alt/tegra186_asrc_alt.c b/sound/soc/tegra-alt/tegra186_asrc_alt.c index c7304842..f889f4d1 100644 --- a/sound/soc/tegra-alt/tegra186_asrc_alt.c +++ b/sound/soc/tegra-alt/tegra186_asrc_alt.c @@ -192,11 +192,13 @@ static int tegra186_asrc_runtime_resume(struct device *dev) regmap_write(asrc->regmap, TEGRA186_ASRC_GLOBAL_INT_CLEAR, 0x01); -#if defined(CONFIG_TEGRA186_ASRC_INT_CLEAR_WAR) - /* Hw Bug:200208400 - asrc interrupt status gets cleared when - it is cleared twice */ - regmap_write(asrc->regmap, TEGRA186_ASRC_GLOBAL_INT_CLEAR, 0x1); -#endif + /** + * Hw Bug:200208400 - asrc interrupt status gets cleared when + * it is cleared twice. This WAR is only applicable for T186 + */ + if (of_machine_is_compatible("nvidia,tegra186-asrc")) + regmap_write(asrc->regmap, TEGRA186_ASRC_GLOBAL_INT_CLEAR, 0x1); + for (lane_id = 0; lane_id < 6; lane_id++) { if (asrc->lane[lane_id].ratio_source == RATIO_SW) { regmap_write(asrc->regmap, @@ -1059,11 +1061,14 @@ static void tegra186_asrc_ahc_cb(void *data) regcache_cache_bypass(asrc->regmap, true); regmap_write(asrc->regmap, TEGRA186_ASRC_GLOBAL_INT_CLEAR, 0x1); -#if defined(CONFIG_TEGRA186_ASRC_INT_CLEAR_WAR) - /* Hw Bug:200208400 - asrc interrupt status gets cleared when - it is cleared twice */ - regmap_write(asrc->regmap, TEGRA186_ASRC_GLOBAL_INT_CLEAR, 0x1); -#endif + + /** + * Hw Bug:200208400 - asrc interrupt status gets cleared when + * it is cleared twice. This WAR is only applicable for T186 + */ + if (of_machine_is_compatible("nvidia,tegra186-asrc")) + regmap_write(asrc->regmap, TEGRA186_ASRC_GLOBAL_INT_CLEAR, 0x1); + regmap_write(asrc->regmap, TEGRA186_ASRC_GLOBAL_ENB, 0x0); udelay(100); regmap_write(asrc->regmap, TEGRA186_ASRC_GLOBAL_ENB, 0x1); @@ -1073,6 +1078,7 @@ static void tegra186_asrc_ahc_cb(void *data) static const struct of_device_id tegra186_asrc_of_match[] = { { .compatible = "nvidia,tegra186-asrc" }, + { .compatible = "nvidia,tegra194-asrc" }, {}, }; static int tegra186_asrc_platform_probe(struct platform_device *pdev)