summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/wm_adsp.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-12-02 21:37:00 +0900
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-12-03 00:09:20 +0900
commit10a2b662c4b49e91a09e225071d3c3508cd6ee83 (patch)
tree112064ea41e577135412f530e61fdc667e817317 /sound/soc/codecs/wm_adsp.c
parente436cadd65c51a57639522f334269793b1c68e22 (diff)
downloadlinux-stable-10a2b662c4b49e91a09e225071d3c3508cd6ee83.tar.gz
linux-stable-10a2b662c4b49e91a09e225071d3c3508cd6ee83.tar.bz2
linux-stable-10a2b662c4b49e91a09e225071d3c3508cd6ee83.zip
ASoC: adsp: Keep ADSP2 memory powered off when not in use
Turn off the ADSP memory when we aren't using it, saving a small amount of power. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm_adsp.c')
-rw-r--r--sound/soc/codecs/wm_adsp.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index a41742da20cb..3a8d75bfb0b1 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -629,6 +629,17 @@ int wm_adsp2_init(struct wm_adsp *adsp, bool dvfs)
{
int ret;
+ /*
+ * Disable the DSP memory by default when in reset for a small
+ * power saving.
+ */
+ ret = regmap_update_bits(adsp->regmap, adsp->base + ADSP2_CONTROL,
+ ADSP2_MEM_ENA, 0);
+ if (ret != 0) {
+ adsp_err(adsp, "Failed to clear memory retention: %d\n", ret);
+ return ret;
+ }
+
if (dvfs) {
adsp->dvfs = devm_regulator_get(adsp->dev, "DCVDD");
if (IS_ERR(adsp->dvfs)) {