summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorPan Xiuli <xiuli.pan@linux.intel.com>2019-04-30 19:09:34 -0400
committerMark Brown <broonie@kernel.org>2019-05-03 02:03:16 -0400
commitdc20e5f315e1967f3d1abb4ede8594cf51bdda47 (patch)
tree09245661df75dd89d37cb17df7005bb8d74bea07 /sound
parentf3da49f055dc55825984c9218fe06b913837cb13 (diff)
ASoC: SOF: Intel: CNL: add ipc dump function
Add ipc dump function to CNL+ platforms. Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/sof/intel/cnl.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/sound/soc/sof/intel/cnl.c b/sound/soc/sof/intel/cnl.c
index 2eac20bbcaea..08a1a3d3c08d 100644
--- a/sound/soc/sof/intel/cnl.c
+++ b/sound/soc/sof/intel/cnl.c
@@ -158,6 +158,24 @@ static int cnl_ipc_send_msg(struct snd_sof_dev *sdev,
158 return 0; 158 return 0;
159} 159}
160 160
161static void cnl_ipc_dump(struct snd_sof_dev *sdev)
162{
163 u32 hipcctl;
164 u32 hipcida;
165 u32 hipctdr;
166
167 /* read IPC status */
168 hipcida = snd_sof_dsp_read(sdev, HDA_DSP_BAR, CNL_DSP_REG_HIPCIDA);
169 hipcctl = snd_sof_dsp_read(sdev, HDA_DSP_BAR, CNL_DSP_REG_HIPCCTL);
170 hipctdr = snd_sof_dsp_read(sdev, HDA_DSP_BAR, CNL_DSP_REG_HIPCTDR);
171
172 /* dump the IPC regs */
173 /* TODO: parse the raw msg */
174 dev_err(sdev->dev,
175 "error: host status 0x%8.8x dsp status 0x%8.8x mask 0x%8.8x\n",
176 hipcida, hipctdr, hipcctl);
177}
178
161/* cannonlake ops */ 179/* cannonlake ops */
162const struct snd_sof_dsp_ops sof_cnl_ops = { 180const struct snd_sof_dsp_ops sof_cnl_ops = {
163 /* probe and remove */ 181 /* probe and remove */
@@ -189,6 +207,7 @@ const struct snd_sof_dsp_ops sof_cnl_ops = {
189 .debug_map = cnl_dsp_debugfs, 207 .debug_map = cnl_dsp_debugfs,
190 .debug_map_count = ARRAY_SIZE(cnl_dsp_debugfs), 208 .debug_map_count = ARRAY_SIZE(cnl_dsp_debugfs),
191 .dbg_dump = hda_dsp_dump, 209 .dbg_dump = hda_dsp_dump,
210 .ipc_dump = cnl_ipc_dump,
192 211
193 /* stream callbacks */ 212 /* stream callbacks */
194 .pcm_open = hda_dsp_pcm_open, 213 .pcm_open = hda_dsp_pcm_open,