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/mtl.c | |
parent | 5b887b4d1e21fcc16bbcf64ac1cac1ab9d0acca2 (diff) | |
parent | 4245fdba89b82befee0d963a85f7494c70432ee9 (diff) |
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/mtl.c')
-rw-r--r-- | sound/soc/sof/intel/mtl.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sound/soc/sof/intel/mtl.c b/sound/soc/sof/intel/mtl.c index 27ec171cb586..10298532816f 100644 --- a/sound/soc/sof/intel/mtl.c +++ b/sound/soc/sof/intel/mtl.c @@ -573,20 +573,19 @@ static int mtl_dsp_ipc_get_window_offset(struct snd_sof_dev *sdev, u32 id) static void mtl_ipc_dump(struct snd_sof_dev *sdev) { - u32 hipcctl; - u32 hipcida; - u32 hipctdr; + u32 hipcidr, hipcidd, hipcida, hipctdr, hipctdd, hipctda, hipcctl; - /* read IPC status */ + hipcidr = snd_sof_dsp_read(sdev, HDA_DSP_BAR, MTL_DSP_REG_HFIPCXIDR); + hipcidd = snd_sof_dsp_read(sdev, HDA_DSP_BAR, MTL_DSP_REG_HFIPCXIDDY); hipcida = snd_sof_dsp_read(sdev, HDA_DSP_BAR, MTL_DSP_REG_HFIPCXIDA); - hipcctl = snd_sof_dsp_read(sdev, HDA_DSP_BAR, MTL_DSP_REG_HFIPCXCTL); hipctdr = snd_sof_dsp_read(sdev, HDA_DSP_BAR, MTL_DSP_REG_HFIPCXTDR); + hipctdd = snd_sof_dsp_read(sdev, HDA_DSP_BAR, MTL_DSP_REG_HFIPCXTDDY); + hipctda = snd_sof_dsp_read(sdev, HDA_DSP_BAR, MTL_DSP_REG_HFIPCXTDA); + hipcctl = snd_sof_dsp_read(sdev, HDA_DSP_BAR, MTL_DSP_REG_HFIPCXCTL); - /* dump the IPC regs */ - /* TODO: parse the raw msg */ dev_err(sdev->dev, - "error: host status 0x%8.8x dsp status 0x%8.8x mask 0x%8.8x\n", - hipcida, hipctdr, hipcctl); + "Host IPC initiator: %#x|%#x|%#x, target: %#x|%#x|%#x, ctl: %#x\n", + hipcidr, hipcidd, hipcida, hipctdr, hipctdd, hipctda, hipcctl); } static int mtl_dsp_disable_interrupts(struct snd_sof_dev *sdev) |