Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: SOF: amd: add module parameter for firmware debug

Add module parameter for firmware debug. If firmware debug
flag is enabled, clear the fusion stall bit which is required
for enabling firmware debugging through JTAG.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230823073340.2829821-3-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Vijendar Mukunda and committed by
Mark Brown
60eb816e 0a142814

+8 -1
+2 -1
sound/soc/sof/amd/acp-loader.c
··· 207 207 208 208 int acp_sof_dsp_run(struct snd_sof_dev *sdev) 209 209 { 210 + struct acp_dev_data *adata = sdev->pdata->hw_pdata; 210 211 const struct sof_amd_acp_desc *desc = get_chip_info(sdev->pdata); 211 212 int val; 212 213 ··· 216 215 dev_dbg(sdev->dev, "ACP_DSP0_RUNSTALL : 0x%0x\n", val); 217 216 218 217 /* Some platforms won't support fusion DSP,keep offset zero for no support */ 219 - if (desc->fusion_dsp_offset) { 218 + if (desc->fusion_dsp_offset && adata->enable_fw_debug) { 220 219 snd_sof_dsp_write(sdev, ACP_DSP_BAR, desc->fusion_dsp_offset, ACP_DSP_RUN); 221 220 val = snd_sof_dsp_read(sdev, ACP_DSP_BAR, desc->fusion_dsp_offset); 222 221 dev_dbg(sdev->dev, "ACP_DSP0_FUSION_RUNSTALL : 0x%0x\n", val);
+5
sound/soc/sof/amd/acp.c
··· 22 22 23 23 #define SECURED_FIRMWARE 1 24 24 25 + static bool enable_fw_debug; 26 + module_param(enable_fw_debug, bool, 0444); 27 + MODULE_PARM_DESC(enable_fw_debug, "Enable Firmware debug"); 28 + 25 29 const struct dmi_system_id acp_sof_quirk_table[] = { 26 30 { 27 31 /* Valve Jupiter device */ ··· 562 558 dev_dbg(sdev->dev, "fw_code_bin:%s, fw_data_bin:%s\n", adata->fw_code_bin, 563 559 adata->fw_data_bin); 564 560 } 561 + adata->enable_fw_debug = enable_fw_debug; 565 562 acp_memory_init(sdev); 566 563 567 564 acp_dsp_stream_init(sdev);
+1
sound/soc/sof/amd/acp.h
··· 205 205 struct acp_dsp_stream *dtrace_stream; 206 206 struct pci_dev *smn_dev; 207 207 struct acp_dsp_stream *probe_stream; 208 + bool enable_fw_debug; 208 209 }; 209 210 210 211 void memcpy_to_scratch(struct snd_sof_dev *sdev, u32 offset, unsigned int *src, size_t bytes);