2018-12-27 17:53:01 +08:00
|
|
|
From 6c1b6c968df3605e60a6b116713952ea24249ba3 Mon Sep 17 00:00:00 2001
|
2018-10-16 02:05:43 +08:00
|
|
|
From: "R, Dharageswari" <dharageswari.r@intel.com>
|
|
|
|
Date: Mon, 25 Dec 2017 07:06:05 +0530
|
2018-12-27 17:53:01 +08:00
|
|
|
Subject: [PATCH 234/296] ASoC: Intel: Skylake: Add an API to reset the usage
|
2018-10-16 02:05:43 +08:00
|
|
|
count of the DSP cores
|
|
|
|
|
|
|
|
Add an interface to reset the usage count of ADSP cores. This is needed in
|
|
|
|
situations where the DSP needs to restart afresh, after a crash
|
|
|
|
|
|
|
|
Change-Id: I56fcd89a9055b99671f0d4229f19aa0fd3340d48
|
|
|
|
Signed-off-by: R, Dharageswari <dharageswari.r@intel.com>
|
|
|
|
Signed-off-by: Pradeep Tewani <pradeep.d.tewani@intel.com>
|
|
|
|
Reviewed-on:
|
|
|
|
Reviewed-by: Periyasamy, SriramX <sriramx.periyasamy@intel.com>
|
|
|
|
Reviewed-by: Kale, Sanyog R <sanyog.r.kale@intel.com>
|
2018-10-30 05:21:52 +08:00
|
|
|
Reviewed-by: Prakash, Divya1
|
2018-10-16 02:05:43 +08:00
|
|
|
Reviewed-by: Kp, Jeeja <jeeja.kp@intel.com>
|
|
|
|
Reviewed-by: Prusty, Subhransu S <subhransu.s.prusty@intel.com>
|
|
|
|
Tested-by: Madiwalar, MadiwalappaX <madiwalappax.madiwalar@intel.com>
|
|
|
|
---
|
|
|
|
sound/soc/intel/skylake/skl-sst-dsp.c | 12 ++++++++++++
|
|
|
|
sound/soc/intel/skylake/skl-sst-dsp.h | 1 +
|
|
|
|
2 files changed, 13 insertions(+)
|
|
|
|
|
|
|
|
diff --git a/sound/soc/intel/skylake/skl-sst-dsp.c b/sound/soc/intel/skylake/skl-sst-dsp.c
|
|
|
|
index b34f7b73e24e..0b1cc44c901d 100644
|
|
|
|
--- a/sound/soc/intel/skylake/skl-sst-dsp.c
|
|
|
|
+++ b/sound/soc/intel/skylake/skl-sst-dsp.c
|
|
|
|
@@ -54,6 +54,18 @@ void skl_dsp_init_core_state(struct sst_dsp *ctx)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
+void skl_dsp_reset_core_state(struct sst_dsp *ctx)
|
|
|
|
+{
|
|
|
|
+ struct skl_sst *skl = ctx->thread_context;
|
|
|
|
+ int i;
|
|
|
|
+
|
|
|
|
+ for (i = 0; i < skl->cores.count; i++) {
|
|
|
|
+ skl->cores.state[i] = SKL_DSP_RESET;
|
|
|
|
+ skl->cores.usage_count[i] = 0;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+EXPORT_SYMBOL_GPL(skl_dsp_reset_core_state);
|
|
|
|
+
|
|
|
|
/* Get the mask for all enabled cores */
|
|
|
|
unsigned int skl_dsp_get_enabled_cores(struct sst_dsp *ctx)
|
|
|
|
{
|
|
|
|
diff --git a/sound/soc/intel/skylake/skl-sst-dsp.h b/sound/soc/intel/skylake/skl-sst-dsp.h
|
|
|
|
index 807f5b7db0ae..ef9bf4a4a1b7 100644
|
|
|
|
--- a/sound/soc/intel/skylake/skl-sst-dsp.h
|
|
|
|
+++ b/sound/soc/intel/skylake/skl-sst-dsp.h
|
|
|
|
@@ -273,6 +273,7 @@ bool is_skl_dsp_running(struct sst_dsp *ctx);
|
|
|
|
|
|
|
|
unsigned int skl_dsp_get_enabled_cores(struct sst_dsp *ctx);
|
|
|
|
void skl_dsp_init_core_state(struct sst_dsp *ctx);
|
|
|
|
+void skl_dsp_reset_core_state(struct sst_dsp *ctx);
|
|
|
|
int skl_dsp_enable_core(struct sst_dsp *ctx, unsigned int core_mask);
|
|
|
|
int skl_dsp_disable_core(struct sst_dsp *ctx, unsigned int core_mask);
|
|
|
|
int skl_dsp_core_power_up(struct sst_dsp *ctx, unsigned int core_mask);
|
|
|
|
--
|
2018-12-27 17:53:01 +08:00
|
|
|
2.19.1
|
2018-10-16 02:05:43 +08:00
|
|
|
|