diff options
author | Nikesh Oswal <noswal@nvidia.com> | 2011-12-13 11:41:47 +0530 |
---|---|---|
committer | Varun Wadekar <vwadekar@nvidia.com> | 2011-12-15 13:57:42 +0530 |
commit | 599e03383493f7a15c46730a85458465467dddeb (patch) | |
tree | 9394f20ec0e1cd52b46127008550dceb87e48f88 /sound/soc/tegra/tegra30_ahub.c | |
parent | 41e98204edf77b4240702237da8bf02b93d74685 (diff) |
asoc: tegra: init cache values for dam/ahub/apbif registers
init cache values for dam/ahub/apbif register by reading
the power on reset values in respective driver probe functions
bug 911332
Change-Id: I693baeff3e076095d3c7f225f1768a4082f7d305
Signed-off-by: Nikesh Oswal <noswal@nvidia.com>
Reviewed-on: http://git-master/r/69679
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Diffstat (limited to 'sound/soc/tegra/tegra30_ahub.c')
-rw-r--r--[-rwxr-xr-x] | sound/soc/tegra/tegra30_ahub.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/sound/soc/tegra/tegra30_ahub.c b/sound/soc/tegra/tegra30_ahub.c index 29476bce6b65..4af245869f60 100755..100644 --- a/sound/soc/tegra/tegra30_ahub.c +++ b/sound/soc/tegra/tegra30_ahub.c @@ -483,7 +483,7 @@ int tegra30_ahub_set_tx_cif_channels(enum tegra30_ahub_txcif txcif, static int __devinit tegra30_ahub_probe(struct platform_device *pdev) { struct resource *res0, *res1, *region; - int ret = 0; + int ret = 0, i = 0, cache_idx_rsvd; if (ahub) return -ENODEV; @@ -556,6 +556,25 @@ static int __devinit tegra30_ahub_probe(struct platform_device *pdev) goto err_release1; } + /* cache the POR values of ahub/apbif regs*/ + tegra30_ahub_enable_clocks(); + + for (i = 0; i < TEGRA30_AHUB_AUDIO_RX_COUNT; i++) + ahub->ahub_reg_cache[i] = tegra30_audio_read(i<<2); + + cache_idx_rsvd = TEGRA30_APBIF_CACHE_REG_INDEX_RSVD; + for (i = 0; i < TEGRA30_APBIF_CACHE_REG_COUNT; i++) { + if (i == cache_idx_rsvd) { + cache_idx_rsvd += + TEGRA30_APBIF_CACHE_REG_INDEX_RSVD_STRIDE; + continue; + } + + ahub->apbif_reg_cache[i] = tegra30_apbif_read(i<<2); + } + + tegra30_ahub_disable_clocks(); + tegra30_ahub_debug_add(ahub); platform_set_drvdata(pdev, ahub); |