Skip to content

Commit e2ff3bd

Browse files
committed
ASoC: SOF: Intel: Add fw_regs area to debugfs map for
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>: The beginning of the first SRAM window contains various fw registers and additional information which can be very beneficial to read to gather information on the current states to debug issues.
2 parents f78bf2c + 61faefa commit e2ff3bd

3 files changed

Lines changed: 13 additions & 4 deletions

File tree

sound/soc/sof/intel/lnl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ static const struct snd_sof_debugfs_map lnl_dsp_debugfs[] = {
2828
{"hda", HDA_DSP_HDA_BAR, 0, 0x4000, SOF_DEBUGFS_ACCESS_ALWAYS},
2929
{"pp", HDA_DSP_PP_BAR, 0, 0x1000, SOF_DEBUGFS_ACCESS_ALWAYS},
3030
{"dsp", HDA_DSP_BAR, 0, 0x10000, SOF_DEBUGFS_ACCESS_ALWAYS},
31+
{"fw_regs", HDA_DSP_BAR, MTL_SRAM_WINDOW_OFFSET(0), 0x1000, SOF_DEBUGFS_ACCESS_D0_ONLY},
3132
};
3233

3334
/* this helps allows the DSP to setup DMIC/SSP */

sound/soc/sof/intel/mtl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ static const struct snd_sof_debugfs_map mtl_dsp_debugfs[] = {
2525
{"hda", HDA_DSP_HDA_BAR, 0, 0x4000, SOF_DEBUGFS_ACCESS_ALWAYS},
2626
{"pp", HDA_DSP_PP_BAR, 0, 0x1000, SOF_DEBUGFS_ACCESS_ALWAYS},
2727
{"dsp", HDA_DSP_BAR, 0, 0x10000, SOF_DEBUGFS_ACCESS_ALWAYS},
28+
{"fw_regs", HDA_DSP_BAR, MTL_SRAM_WINDOW_OFFSET(0), 0x1000, SOF_DEBUGFS_ACCESS_D0_ONLY},
2829
};
2930

3031
static void mtl_ipc_host_done(struct snd_sof_dev *sdev)

sound/soc/sof/intel/tgl.c

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ static const struct snd_sof_debugfs_map tgl_dsp_debugfs[] = {
2222
{"dsp", HDA_DSP_BAR, 0, 0x10000, SOF_DEBUGFS_ACCESS_ALWAYS},
2323
};
2424

25+
static const struct snd_sof_debugfs_map tgl_ipc4_dsp_debugfs[] = {
26+
{"hda", HDA_DSP_HDA_BAR, 0, 0x4000, SOF_DEBUGFS_ACCESS_ALWAYS},
27+
{"pp", HDA_DSP_PP_BAR, 0, 0x1000, SOF_DEBUGFS_ACCESS_ALWAYS},
28+
{"dsp", HDA_DSP_BAR, 0, 0x10000, SOF_DEBUGFS_ACCESS_ALWAYS},
29+
{"fw_regs", HDA_DSP_BAR, SRAM_WINDOW_OFFSET(0), 0x1000, SOF_DEBUGFS_ACCESS_D0_ONLY},
30+
};
31+
2532
static int tgl_dsp_core_get(struct snd_sof_dev *sdev, int core)
2633
{
2734
const struct sof_ipc_pm_ops *pm_ops = sdev->ipc->ops->pm;
@@ -75,6 +82,8 @@ int sof_tgl_ops_init(struct snd_sof_dev *sdev)
7582

7683
/* debug */
7784
sof_tgl_ops.ipc_dump = cnl_ipc_dump;
85+
sof_tgl_ops.debug_map = tgl_dsp_debugfs;
86+
sof_tgl_ops.debug_map_count = ARRAY_SIZE(tgl_dsp_debugfs);
7887

7988
sof_tgl_ops.set_power_state = hda_dsp_set_power_state_ipc3;
8089
}
@@ -105,17 +114,15 @@ int sof_tgl_ops_init(struct snd_sof_dev *sdev)
105114
/* debug */
106115
sof_tgl_ops.ipc_dump = cnl_ipc4_dump;
107116
sof_tgl_ops.dbg_dump = hda_ipc4_dsp_dump;
117+
sof_tgl_ops.debug_map = tgl_ipc4_dsp_debugfs;
118+
sof_tgl_ops.debug_map_count = ARRAY_SIZE(tgl_ipc4_dsp_debugfs);
108119

109120
sof_tgl_ops.set_power_state = hda_dsp_set_power_state_ipc4;
110121
}
111122

112123
/* set DAI driver ops */
113124
hda_set_dai_drv_ops(sdev, &sof_tgl_ops);
114125

115-
/* debug */
116-
sof_tgl_ops.debug_map = tgl_dsp_debugfs;
117-
sof_tgl_ops.debug_map_count = ARRAY_SIZE(tgl_dsp_debugfs);
118-
119126
/* pre/post fw run */
120127
sof_tgl_ops.post_fw_run = hda_dsp_post_fw_run;
121128

0 commit comments

Comments
 (0)