diff options
author | Pan Xiuli <xiuli.pan@linux.intel.com> | 2019-04-30 18:09:33 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-05-03 15:02:43 +0900 |
commit | f3da49f055dc55825984c9218fe06b913837cb13 (patch) | |
tree | 9f79827038202fc3f9bb75f6d5fe375adb5dc1c7 /sound/soc/sof/intel/hda.c | |
parent | ASoC: SOF: IPC: add ipc dump function (diff) | |
download | linux-dev-f3da49f055dc55825984c9218fe06b913837cb13.tar.xz linux-dev-f3da49f055dc55825984c9218fe06b913837cb13.zip |
ASoC: SOF: Intel: APL: add ipc dump function
Add IPC dump function for APL plaform
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/soc/sof/intel/hda.c')
-rw-r--r-- | sound/soc/sof/intel/hda.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c index 84baf275b467..7e3980a2f7ba 100644 --- a/sound/soc/sof/intel/hda.c +++ b/sound/soc/sof/intel/hda.c @@ -179,6 +179,24 @@ void hda_dsp_dump(struct snd_sof_dev *sdev, u32 flags) } } +void hda_ipc_dump(struct snd_sof_dev *sdev) +{ + u32 hipcie; + u32 hipct; + u32 hipcctl; + + /* 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); + 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, + "error: host status 0x%8.8x dsp status 0x%8.8x mask 0x%8.8x\n", + hipcie, hipct, hipcctl); +} + static int hda_init(struct snd_sof_dev *sdev) { struct hda_bus *hbus; |