Unverified Commit 4d4021b0 authored by sheetal's avatar sheetal Committed by Mark Brown
Browse files

ASoC: tegra: Fix uninitialized flat cache warning in tegra210_ahub



The tegra210_ahub driver started triggering a warning after commit
e062bdfd ("regmap: warn users about uninitialized flat cache"),
which flags drivers using REGCACHE_FLAT without register defaults.
Since the driver omits default definitions because its registers are
zero initialized, the following warning is shown:

  WARNING KERN tegra210-ahub 2900800.ahub: using zero-initialized flat cache, this may cause unexpected behavior

Switch to REGCACHE_FLAT_S which is the recommended cache type for
sparse register maps without defaults. This cache type initializes
entries on-demand from hardware, eliminating the warning while using
memory efficiently.

Signed-off-by: default avatarsheetal <sheetal@nvidia.com>
Link: https://patch.msgid.link/20251208052040.4025612-1-sheetal@nvidia.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 8f0b4cce
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -2077,7 +2077,7 @@ static const struct regmap_config tegra210_ahub_regmap_config = {
	.val_bits		= 32,
	.reg_stride		= 4,
	.max_register		= TEGRA210_MAX_REGISTER_ADDR,
	.cache_type		= REGCACHE_FLAT,
	.cache_type		= REGCACHE_FLAT_S,
};

static const struct regmap_config tegra186_ahub_regmap_config = {
@@ -2085,7 +2085,7 @@ static const struct regmap_config tegra186_ahub_regmap_config = {
	.val_bits		= 32,
	.reg_stride		= 4,
	.max_register		= TEGRA186_MAX_REGISTER_ADDR,
	.cache_type		= REGCACHE_FLAT,
	.cache_type		= REGCACHE_FLAT_S,
};

static const struct regmap_config tegra264_ahub_regmap_config = {
@@ -2094,7 +2094,7 @@ static const struct regmap_config tegra264_ahub_regmap_config = {
	.reg_stride		= 4,
	.writeable_reg		= tegra264_ahub_wr_reg,
	.max_register		= TEGRA264_MAX_REGISTER_ADDR,
	.cache_type		= REGCACHE_FLAT,
	.cache_type		= REGCACHE_FLAT_S,
};

static const struct tegra_ahub_soc_data soc_data_tegra210 = {