[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260106140827.3771375-3-sheetal@nvidia.com>
Date: Tue, 6 Jan 2026 19:38:27 +0530
From: "Sheetal ." <sheetal@...dia.com>
To: Mark Brown <broonie@...nel.org>
CC: Sander Vanheule <sander@...nheule.net>, Greg Kroah-Hartman
<gregkh@...uxfoundation.org>, "Rafael J . Wysocki" <rafael@...nel.org>,
Danilo Krummrich <dakr@...nel.org>, Liam Girdwood <lgirdwood@...il.com>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>, "Thierry
Reding" <thierry.reding@...il.com>, Jonathan Hunter <jonathanh@...dia.com>,
<linux-kernel@...r.kernel.org>, <linux-sound@...r.kernel.org>,
<linux-tegra@...r.kernel.org>, Sheetal <sheetal@...dia.com>
Subject: [RFC PATCH 2/2] ASoC: tegra: Enable cache_default_is_zero for audio drivers
From: Sheetal <sheetal@...dia.com>
Set cache_default_is_zero flag in Tegra audio driver regmap configurations.
Tegra APE hardware has numerous registers with zero power-on-reset
values. Use cache_default_is_zero to mark cache entries as valid instead
of adding all these registers to reg_defaults arrays.
This patch depends on:
https://patchwork.ozlabs.org/project/linux-tegra/patch/20251217132524.2844499-1-sheetal@nvidia.com/
Signed-off-by: Sheetal <sheetal@...dia.com>
---
sound/soc/tegra/tegra186_asrc.c | 1 +
sound/soc/tegra/tegra186_dspk.c | 1 +
sound/soc/tegra/tegra210_admaif.c | 3 +++
sound/soc/tegra/tegra210_adx.c | 2 ++
sound/soc/tegra/tegra210_ahub.c | 3 +++
sound/soc/tegra/tegra210_amx.c | 3 +++
sound/soc/tegra/tegra210_dmic.c | 1 +
sound/soc/tegra/tegra210_i2s.c | 2 ++
sound/soc/tegra/tegra210_mbdrc.c | 1 +
sound/soc/tegra/tegra210_mixer.c | 1 +
sound/soc/tegra/tegra210_mvc.c | 1 +
sound/soc/tegra/tegra210_ope.c | 1 +
sound/soc/tegra/tegra210_peq.c | 1 +
sound/soc/tegra/tegra210_sfc.c | 1 +
14 files changed, 22 insertions(+)
diff --git a/sound/soc/tegra/tegra186_asrc.c b/sound/soc/tegra/tegra186_asrc.c
index 2c0220e14a57..2f3382a674e7 100644
--- a/sound/soc/tegra/tegra186_asrc.c
+++ b/sound/soc/tegra/tegra186_asrc.c
@@ -951,6 +951,7 @@ static const struct regmap_config tegra186_asrc_regmap_config = {
.reg_defaults = tegra186_asrc_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(tegra186_asrc_reg_defaults),
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static const struct tegra_asrc_soc_data soc_data_tegra186 = {
diff --git a/sound/soc/tegra/tegra186_dspk.c b/sound/soc/tegra/tegra186_dspk.c
index a762150db802..84c54e710cff 100644
--- a/sound/soc/tegra/tegra186_dspk.c
+++ b/sound/soc/tegra/tegra186_dspk.c
@@ -468,6 +468,7 @@ static const struct regmap_config tegra186_dspk_regmap = {
.reg_defaults = tegra186_dspk_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(tegra186_dspk_reg_defaults),
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static const struct of_device_id tegra186_dspk_of_match[] = {
diff --git a/sound/soc/tegra/tegra210_admaif.c b/sound/soc/tegra/tegra210_admaif.c
index f9f6040c4e34..bb2f42560065 100644
--- a/sound/soc/tegra/tegra210_admaif.c
+++ b/sound/soc/tegra/tegra210_admaif.c
@@ -242,6 +242,7 @@ static const struct regmap_config tegra210_admaif_regmap_config = {
.reg_defaults = tegra210_admaif_reg_defaults,
.num_reg_defaults = TEGRA210_ADMAIF_CHANNEL_COUNT * 6 + 1,
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static const struct regmap_config tegra186_admaif_regmap_config = {
@@ -255,6 +256,7 @@ static const struct regmap_config tegra186_admaif_regmap_config = {
.reg_defaults = tegra186_admaif_reg_defaults,
.num_reg_defaults = TEGRA186_ADMAIF_CHANNEL_COUNT * 6 + 1,
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static const struct regmap_config tegra264_admaif_regmap_config = {
@@ -268,6 +270,7 @@ static const struct regmap_config tegra264_admaif_regmap_config = {
.reg_defaults = tegra264_admaif_reg_defaults,
.num_reg_defaults = TEGRA264_ADMAIF_CHANNEL_COUNT * 6 + 1,
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static int tegra_admaif_runtime_suspend(struct device *dev)
diff --git a/sound/soc/tegra/tegra210_adx.c b/sound/soc/tegra/tegra210_adx.c
index 6c9a410085bc..dd6261a0442c 100644
--- a/sound/soc/tegra/tegra210_adx.c
+++ b/sound/soc/tegra/tegra210_adx.c
@@ -626,6 +626,7 @@ static const struct regmap_config tegra210_adx_regmap_config = {
.reg_defaults = tegra210_adx_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(tegra210_adx_reg_defaults),
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static const struct regmap_config tegra264_adx_regmap_config = {
@@ -639,6 +640,7 @@ static const struct regmap_config tegra264_adx_regmap_config = {
.reg_defaults = tegra264_adx_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(tegra264_adx_reg_defaults),
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static const struct tegra210_adx_soc_data soc_data_tegra210 = {
diff --git a/sound/soc/tegra/tegra210_ahub.c b/sound/soc/tegra/tegra210_ahub.c
index e795907a3963..4cf21a9aca32 100644
--- a/sound/soc/tegra/tegra210_ahub.c
+++ b/sound/soc/tegra/tegra210_ahub.c
@@ -2078,6 +2078,7 @@ static const struct regmap_config tegra210_ahub_regmap_config = {
.reg_stride = 4,
.max_register = TEGRA210_MAX_REGISTER_ADDR,
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static const struct regmap_config tegra186_ahub_regmap_config = {
@@ -2086,6 +2087,7 @@ static const struct regmap_config tegra186_ahub_regmap_config = {
.reg_stride = 4,
.max_register = TEGRA186_MAX_REGISTER_ADDR,
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static const struct regmap_config tegra264_ahub_regmap_config = {
@@ -2095,6 +2097,7 @@ static const struct regmap_config tegra264_ahub_regmap_config = {
.writeable_reg = tegra264_ahub_wr_reg,
.max_register = TEGRA264_MAX_REGISTER_ADDR,
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static const struct tegra_ahub_soc_data soc_data_tegra210 = {
diff --git a/sound/soc/tegra/tegra210_amx.c b/sound/soc/tegra/tegra210_amx.c
index c94f8c84e04f..0a9402102ba1 100644
--- a/sound/soc/tegra/tegra210_amx.c
+++ b/sound/soc/tegra/tegra210_amx.c
@@ -655,6 +655,7 @@ static const struct regmap_config tegra210_amx_regmap_config = {
.reg_defaults = tegra210_amx_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(tegra210_amx_reg_defaults),
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static const struct regmap_config tegra194_amx_regmap_config = {
@@ -668,6 +669,7 @@ static const struct regmap_config tegra194_amx_regmap_config = {
.reg_defaults = tegra210_amx_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(tegra210_amx_reg_defaults),
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static const struct regmap_config tegra264_amx_regmap_config = {
@@ -681,6 +683,7 @@ static const struct regmap_config tegra264_amx_regmap_config = {
.reg_defaults = tegra264_amx_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(tegra264_amx_reg_defaults),
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static const struct tegra210_amx_soc_data soc_data_tegra210 = {
diff --git a/sound/soc/tegra/tegra210_dmic.c b/sound/soc/tegra/tegra210_dmic.c
index 66fff53aeaa6..d87f29ce1daa 100644
--- a/sound/soc/tegra/tegra210_dmic.c
+++ b/sound/soc/tegra/tegra210_dmic.c
@@ -484,6 +484,7 @@ static const struct regmap_config tegra210_dmic_regmap_config = {
.reg_defaults = tegra210_dmic_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(tegra210_dmic_reg_defaults),
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static int tegra210_dmic_probe(struct platform_device *pdev)
diff --git a/sound/soc/tegra/tegra210_i2s.c b/sound/soc/tegra/tegra210_i2s.c
index b91e0e6cd7fe..0dc853645905 100644
--- a/sound/soc/tegra/tegra210_i2s.c
+++ b/sound/soc/tegra/tegra210_i2s.c
@@ -998,6 +998,7 @@ static const struct regmap_config tegra210_regmap_conf = {
.reg_defaults = tegra210_i2s_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(tegra210_i2s_reg_defaults),
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
/*
@@ -1045,6 +1046,7 @@ static const struct regmap_config tegra264_regmap_conf = {
.reg_defaults = tegra264_i2s_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(tegra264_i2s_reg_defaults),
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static int tegra210_i2s_probe(struct platform_device *pdev)
diff --git a/sound/soc/tegra/tegra210_mbdrc.c b/sound/soc/tegra/tegra210_mbdrc.c
index 09fe3c5cf540..83906e484343 100644
--- a/sound/soc/tegra/tegra210_mbdrc.c
+++ b/sound/soc/tegra/tegra210_mbdrc.c
@@ -764,6 +764,7 @@ static const struct regmap_config tegra210_mbdrc_regmap_cfg = {
.reg_defaults = tegra210_mbdrc_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(tegra210_mbdrc_reg_defaults),
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
int tegra210_mbdrc_hw_params(struct snd_soc_component *cmpnt)
diff --git a/sound/soc/tegra/tegra210_mixer.c b/sound/soc/tegra/tegra210_mixer.c
index ff8e9f2d7abf..c8157388ad70 100644
--- a/sound/soc/tegra/tegra210_mixer.c
+++ b/sound/soc/tegra/tegra210_mixer.c
@@ -609,6 +609,7 @@ static const struct regmap_config tegra210_mixer_regmap_config = {
.reg_defaults = tegra210_mixer_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(tegra210_mixer_reg_defaults),
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static const struct of_device_id tegra210_mixer_of_match[] = {
diff --git a/sound/soc/tegra/tegra210_mvc.c b/sound/soc/tegra/tegra210_mvc.c
index 779d4c199da9..f3a5048dcf7a 100644
--- a/sound/soc/tegra/tegra210_mvc.c
+++ b/sound/soc/tegra/tegra210_mvc.c
@@ -700,6 +700,7 @@ static const struct regmap_config tegra210_mvc_regmap_config = {
.reg_defaults = tegra210_mvc_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(tegra210_mvc_reg_defaults),
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static const struct of_device_id tegra210_mvc_of_match[] = {
diff --git a/sound/soc/tegra/tegra210_ope.c b/sound/soc/tegra/tegra210_ope.c
index 27db70af2746..c7ac94f0a711 100644
--- a/sound/soc/tegra/tegra210_ope.c
+++ b/sound/soc/tegra/tegra210_ope.c
@@ -298,6 +298,7 @@ static const struct regmap_config tegra210_ope_regmap_config = {
.reg_defaults = tegra210_ope_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(tegra210_ope_reg_defaults),
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static int tegra210_ope_probe(struct platform_device *pdev)
diff --git a/sound/soc/tegra/tegra210_peq.c b/sound/soc/tegra/tegra210_peq.c
index 9a05e6913276..8d4821a4cc58 100644
--- a/sound/soc/tegra/tegra210_peq.c
+++ b/sound/soc/tegra/tegra210_peq.c
@@ -307,6 +307,7 @@ static const struct regmap_config tegra210_peq_regmap_config = {
.reg_defaults = tegra210_peq_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(tegra210_peq_reg_defaults),
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
void tegra210_peq_restore(struct regmap *regmap, u32 *biquad_gains,
diff --git a/sound/soc/tegra/tegra210_sfc.c b/sound/soc/tegra/tegra210_sfc.c
index d6341968bebe..89208820d451 100644
--- a/sound/soc/tegra/tegra210_sfc.c
+++ b/sound/soc/tegra/tegra210_sfc.c
@@ -3570,6 +3570,7 @@ static const struct regmap_config tegra210_sfc_regmap_config = {
.reg_defaults = tegra210_sfc_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(tegra210_sfc_reg_defaults),
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static const struct of_device_id tegra210_sfc_of_match[] = {
--
2.34.1
Powered by blists - more mailing lists