diff options
author | Mark Brown <broonie@kernel.org> | 2022-09-23 20:46:25 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-09-23 20:46:25 +0100 |
commit | e9b0ff9336850863e608c2df0dde512adecb4a20 (patch) | |
tree | 33575a8be2e9c5db231c7df63a83beb65b6d8775 /sound/soc/sof/intel/hda.c | |
parent | ASoC: codecs: qcom add support for SM8450 and SC8280XP (diff) | |
parent | ASoC: SOF: ipc4: Call snd_sof_handle_fw_exception() in case of timeout (diff) | |
download | linux-dev-e9b0ff9336850863e608c2df0dde512adecb4a20.tar.xz linux-dev-e9b0ff9336850863e608c2df0dde512adecb4a20.zip |
ASoC: SOF: ipc4/Intel: Improve and enable IPC error dump
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:
On Intel platforms the registers for DSP communications are used differently,
the IPC dump information is not correct since important registers are not
printed and existing ones are used a bit differently for IPC4.
As a last step, enable the IPC timeout 'handling' and allow the printout of
the now usefull IPC dump.
Diffstat (limited to 'sound/soc/sof/intel/hda.c')
-rw-r--r-- | sound/soc/sof/intel/hda.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c index 35f074aa69da..1188ec51816b 100644 --- a/sound/soc/sof/intel/hda.c +++ b/sound/soc/sof/intel/hda.c @@ -598,7 +598,8 @@ void hda_dsp_dump(struct snd_sof_dev *sdev, u32 flags) /* print ROM/FW status */ hda_dsp_get_state(sdev, level); - if (flags & SOF_DBG_DUMP_REGS) { + /* The firmware register dump only available with IPC3 */ + if (flags & SOF_DBG_DUMP_REGS && sdev->pdata->ipc_type == SOF_IPC) { u32 status = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_SRAM_REG_FW_STATUS); u32 panic = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_SRAM_REG_FW_TRACEP); @@ -662,6 +663,24 @@ void hda_ipc_dump(struct snd_sof_dev *sdev) hipcie, hipct, hipcctl); } +void hda_ipc4_dump(struct snd_sof_dev *sdev) +{ + u32 hipci, hipcie, hipct, hipcte, hipcctl; + + hda_ipc_irq_dump(sdev); + + hipci = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_HIPCI); + hipcie = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_HIPCIE); + hipct = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_HIPCT); + hipcte = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_HIPCTE); + hipcctl = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_HIPCCTL); + + /* dump the IPC regs */ + /* TODO: parse the raw msg */ + dev_err(sdev->dev, "Host IPC initiator: %#x|%#x, target: %#x|%#x, ctl: %#x\n", + hipci, hipcie, hipct, hipcte, hipcctl); +} + static int hda_init(struct snd_sof_dev *sdev) { struct hda_bus *hbus; |