summaryrefslogtreecommitdiff
path: root/sound/soc/tegra/tegra30_ahub.h
diff options
context:
space:
mode:
authorNikesh Oswal <noswal@nvidia.com>2011-11-18 14:59:12 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:50:23 -0800
commitab8abd6275cfe826002956d13a72d290ae344474 (patch)
treedee88307d894907f8894e97d2db1786003230f18 /sound/soc/tegra/tegra30_ahub.h
parent9f655d719048c0eda67e041f365325f07ac0eef5 (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.h16
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