ASoC: SOF: intel: extend IPC dump information
Extend the HDA IPC dump implementation with status of key IRQ registers. This is useful to debug IPC timeouts and similar issues. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
@@ -15,6 +15,9 @@
|
||||
* Hardware interface for generic Intel audio DSP HDA IP
|
||||
*/
|
||||
|
||||
#include <sound/hdaudio_ext.h>
|
||||
#include <sound/hda_register.h>
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <sound/hdaudio_ext.h>
|
||||
#include <sound/sof.h>
|
||||
@@ -183,12 +186,38 @@ void hda_dsp_dump(struct snd_sof_dev *sdev, u32 flags)
|
||||
}
|
||||
}
|
||||
|
||||
void hda_ipc_irq_dump(struct snd_sof_dev *sdev)
|
||||
{
|
||||
struct hdac_bus *bus = sof_to_bus(sdev);
|
||||
u32 adspis;
|
||||
u32 intsts;
|
||||
u32 intctl;
|
||||
u32 ppsts;
|
||||
u8 rirbsts;
|
||||
|
||||
/* read key IRQ stats and config registers */
|
||||
adspis = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_ADSPIS);
|
||||
intsts = snd_sof_dsp_read(sdev, HDA_DSP_HDA_BAR, SOF_HDA_INTSTS);
|
||||
intctl = snd_sof_dsp_read(sdev, HDA_DSP_HDA_BAR, SOF_HDA_INTCTL);
|
||||
ppsts = snd_sof_dsp_read(sdev, HDA_DSP_PP_BAR, SOF_HDA_REG_PP_PPSTS);
|
||||
rirbsts = snd_hdac_chip_readb(bus, RIRBSTS);
|
||||
|
||||
dev_err(sdev->dev,
|
||||
"error: hda irq intsts 0x%8.8x intlctl 0x%8.8x rirb %2.2x\n",
|
||||
intsts, intctl, rirbsts);
|
||||
dev_err(sdev->dev,
|
||||
"error: dsp irq ppsts 0x%8.8x adspis 0x%8.8x\n",
|
||||
ppsts, adspis);
|
||||
}
|
||||
|
||||
void hda_ipc_dump(struct snd_sof_dev *sdev)
|
||||
{
|
||||
u32 hipcie;
|
||||
u32 hipct;
|
||||
u32 hipcctl;
|
||||
|
||||
hda_ipc_irq_dump(sdev);
|
||||
|
||||
/* read IPC status */
|
||||
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);
|
||||
|
Reference in New Issue
Block a user