]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ASoC: tegra: Use flat regcache
authorDylan Reid <dgreid@chromium.org>
Tue, 18 Mar 2014 05:08:49 +0000 (22:08 -0700)
committerMark Brown <broonie@linaro.org>
Wed, 19 Mar 2014 23:09:45 +0000 (23:09 +0000)
When using an rbtree cache, there can be allocations the first time a
register is accessed.  This can cause an attempt to schedule while
atomic in the case that the regmap is using a spinlock.  This could be
fixed by either initializing all the registers or using a flat cache.
The register maps for tegra30_ahub and tegra30_i2s are dense and don't
save much from using a tree so convert them to flat.

Tegra30 changes tested on Norrin, Tegra20 changes compile.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/tegra/tegra20_ac97.c
sound/soc/tegra/tegra20_das.c
sound/soc/tegra/tegra20_i2s.c
sound/soc/tegra/tegra20_spdif.c
sound/soc/tegra/tegra30_ahub.c
sound/soc/tegra/tegra30_i2s.c

index cf5e1cfe818d9b6a8c4f980e4d5c9f23dacbe2c6..0a59e2383ef357ba4d4d83f57a5df9e448a4373c 100644 (file)
@@ -306,7 +306,7 @@ static const struct regmap_config tegra20_ac97_regmap_config = {
        .readable_reg = tegra20_ac97_wr_rd_reg,
        .volatile_reg = tegra20_ac97_volatile_reg,
        .precious_reg = tegra20_ac97_precious_reg,
-       .cache_type = REGCACHE_RBTREE,
+       .cache_type = REGCACHE_FLAT,
 };
 
 static int tegra20_ac97_platform_probe(struct platform_device *pdev)
index e72392927bd2ba3b7ca192e4ff75dde96b2488bd..a634f13b3ffc51456ea174c885196fe3dd26f3f2 100644 (file)
@@ -128,7 +128,7 @@ static const struct regmap_config tegra20_das_regmap_config = {
        .max_register = LAST_REG(DAC_INPUT_DATA_CLK_SEL),
        .writeable_reg = tegra20_das_wr_rd_reg,
        .readable_reg = tegra20_das_wr_rd_reg,
-       .cache_type = REGCACHE_RBTREE,
+       .cache_type = REGCACHE_FLAT,
 };
 
 static int tegra20_das_probe(struct platform_device *pdev)
index 42c1f6bfaf2e5bb2a4f2df89269be672b26e377c..79a9932ffe6ed49b2a99ba4b66c5b205b9877da4 100644 (file)
@@ -333,7 +333,7 @@ static const struct regmap_config tegra20_i2s_regmap_config = {
        .readable_reg = tegra20_i2s_wr_rd_reg,
        .volatile_reg = tegra20_i2s_volatile_reg,
        .precious_reg = tegra20_i2s_precious_reg,
-       .cache_type = REGCACHE_RBTREE,
+       .cache_type = REGCACHE_FLAT,
 };
 
 static int tegra20_i2s_platform_probe(struct platform_device *pdev)
index 8c7c1028e5797dbc9b23ec88b58a4cd840db1c5c..a0ce92400faf9e69331b2fdbf33d854c1b6f469c 100644 (file)
@@ -259,7 +259,7 @@ static const struct regmap_config tegra20_spdif_regmap_config = {
        .readable_reg = tegra20_spdif_wr_rd_reg,
        .volatile_reg = tegra20_spdif_volatile_reg,
        .precious_reg = tegra20_spdif_precious_reg,
-       .cache_type = REGCACHE_RBTREE,
+       .cache_type = REGCACHE_FLAT,
 };
 
 static int tegra20_spdif_platform_probe(struct platform_device *pdev)
index d6f4c9940e0c64fee63b1e447ba11b40a5cfc2d1..0db68f49f4d9ba02c05ff71379ade1dd8e98d17c 100644 (file)
@@ -471,7 +471,7 @@ static const struct regmap_config tegra30_ahub_apbif_regmap_config = {
        .readable_reg = tegra30_ahub_apbif_wr_rd_reg,
        .volatile_reg = tegra30_ahub_apbif_volatile_reg,
        .precious_reg = tegra30_ahub_apbif_precious_reg,
-       .cache_type = REGCACHE_RBTREE,
+       .cache_type = REGCACHE_FLAT,
 };
 
 static bool tegra30_ahub_ahub_wr_rd_reg(struct device *dev, unsigned int reg)
@@ -490,7 +490,7 @@ static const struct regmap_config tegra30_ahub_ahub_regmap_config = {
        .max_register = LAST_REG(AUDIO_RX),
        .writeable_reg = tegra30_ahub_ahub_wr_rd_reg,
        .readable_reg = tegra30_ahub_ahub_wr_rd_reg,
-       .cache_type = REGCACHE_RBTREE,
+       .cache_type = REGCACHE_FLAT,
 };
 
 static struct tegra30_ahub_soc_data soc_data_tegra30 = {
index 49ad9366add86b008823f6091315d74d78f13aeb..f146c41dd3ecddb5b2d0f471eaa08e1b447235e7 100644 (file)
@@ -357,7 +357,7 @@ static const struct regmap_config tegra30_i2s_regmap_config = {
        .writeable_reg = tegra30_i2s_wr_rd_reg,
        .readable_reg = tegra30_i2s_wr_rd_reg,
        .volatile_reg = tegra30_i2s_volatile_reg,
-       .cache_type = REGCACHE_RBTREE,
+       .cache_type = REGCACHE_FLAT,
 };
 
 static const struct tegra30_i2s_soc_data tegra30_i2s_config = {