diff options
author | Nikesh Oswal <noswal@nvidia.com> | 2011-11-18 14:59:12 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2012-03-23 15:49:20 -0700 |
commit | 9bdf20ae5a0f85c0da0dc090d0c1667ab47e748c (patch) | |
tree | 02a664c5918d2a5f977ace484d6738b7ae7ed77b /sound/soc/tegra/tegra30_ahub.h | |
parent | 3ea94196dd27afd024e157d217811794b2c048c4 (diff) |
asoc: tegra: add power management functionality in t30 drivers
add code for handling register save/restore and clocks
disable/enable during suspend/resume
Bug: 862023
Change-Id: I1b709b6bf674c9a2d93c2a21c1f44bbadff64aab
Signed-off-by: Nikesh Oswal <noswal@nvidia.com>
Reviewed-on: http://git-master/r/65478
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Scott Peterson <speterson@nvidia.com>
Rebase-Id: R2383486dac0892e317dbd25044df59284031b6c4
Diffstat (limited to 'sound/soc/tegra/tegra30_ahub.h')
-rw-r--r-- | sound/soc/tegra/tegra30_ahub.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sound/soc/tegra/tegra30_ahub.h b/sound/soc/tegra/tegra30_ahub.h index 84c2cdfd69a8..0d18f9c94bcc 100644 --- a/sound/soc/tegra/tegra30_ahub.h +++ b/sound/soc/tegra/tegra30_ahub.h @@ -399,6 +399,14 @@ /* This register repeats once for each entry in enum tegra30_ahub_rxcif */ /* The fields in this register are 1 bit per entry in tegra30_ahub_txcif */ +/* apbif register count */ +#define TEGRA30_APBIF_CACHE_REG_COUNT_PER_CHANNEL ((TEGRA30_AHUB_CIF_RX_CTRL>>2) + 1) +#define TEGRA30_APBIF_CACHE_REG_COUNT ((TEGRA30_APBIF_CACHE_REG_COUNT_PER_CHANNEL + 1) * TEGRA30_AHUB_CHANNEL_CTRL_COUNT) + +/* cache index to be skipped */ +#define TEGRA30_APBIF_CACHE_REG_INDEX_RSVD TEGRA30_APBIF_CACHE_REG_COUNT_PER_CHANNEL +#define TEGRA30_APBIF_CACHE_REG_INDEX_RSVD_STRIDE (TEGRA30_APBIF_CACHE_REG_COUNT_PER_CHANNEL + 1) + /* * Terminology: * AHUB: Audio Hub; a cross-bar switch between the audio devices: DMA FIFOs, @@ -481,6 +489,10 @@ extern int tegra30_ahub_set_rx_cif_source(enum tegra30_ahub_rxcif rxcif, enum tegra30_ahub_txcif txcif); extern int tegra30_ahub_unset_rx_cif_source(enum tegra30_ahub_rxcif rxcif); +#ifdef CONFIG_PM +extern int tegra30_ahub_apbif_resume(); +#endif + struct tegra30_ahub { struct device *dev; struct clk *clk_d_audio; @@ -491,6 +503,10 @@ struct tegra30_ahub { DECLARE_BITMAP(rx_usage, TEGRA30_AHUB_CHANNEL_CTRL_COUNT); DECLARE_BITMAP(tx_usage, TEGRA30_AHUB_CHANNEL_CTRL_COUNT); struct dentry *debug; +#ifdef CONFIG_PM + u32 ahub_reg_cache[TEGRA30_AHUB_AUDIO_RX_COUNT]; + u32 apbif_reg_cache[TEGRA30_APBIF_CACHE_REG_COUNT]; +#endif }; #endif |