forked from Minki/linux
ASoC: SOF: Drop SOF_DBG_DUMP_FORCE_ERR_LEVEL and sof_dev_dbg_or_err
The sof_dev_dbg_or_err() is only used by intel/hda.c when dumping dsp debug information. It was used to print the extended rom status in either dev_dbg (during retries) and finally with dev_err, but other lines were printed with dev_err regardless. Since we now only print the dump once, the flag and the macros is no longer needed. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20211006110645.26679-11-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
0ecaa2fff2
commit
23013335bc
@ -180,14 +180,9 @@ err:
|
||||
flags = SOF_DBG_DUMP_REGS | SOF_DBG_DUMP_PCI | SOF_DBG_DUMP_MBOX |
|
||||
SOF_DBG_DUMP_OPTIONAL;
|
||||
|
||||
/*
|
||||
* after max boot attempts make sure that the dump is printed and error
|
||||
* log level is used
|
||||
*/
|
||||
if (hda->boot_iteration == HDA_FW_BOOT_ATTEMPTS) {
|
||||
flags |= SOF_DBG_DUMP_FORCE_ERR_LEVEL;
|
||||
/* after max boot attempts make sure that the dump is printed */
|
||||
if (hda->boot_iteration == HDA_FW_BOOT_ATTEMPTS)
|
||||
flags &= ~SOF_DBG_DUMP_OPTIONAL;
|
||||
}
|
||||
|
||||
snd_sof_dsp_dbg_dump(sdev, flags);
|
||||
snd_sof_dsp_core_power_down(sdev, chip->host_managed_cores_mask);
|
||||
@ -421,7 +416,7 @@ int hda_dsp_cl_boot_firmware(struct snd_sof_dev *sdev)
|
||||
dev_dbg(sdev->dev, "Firmware download successful, booting...\n");
|
||||
} else {
|
||||
snd_sof_dsp_dbg_dump(sdev, SOF_DBG_DUMP_REGS | SOF_DBG_DUMP_PCI |
|
||||
SOF_DBG_DUMP_MBOX | SOF_DBG_DUMP_FORCE_ERR_LEVEL);
|
||||
SOF_DBG_DUMP_MBOX);
|
||||
dev_err(sdev->dev, "error: load fw failed ret: %d\n", ret);
|
||||
}
|
||||
|
||||
|
@ -532,8 +532,7 @@ static void hda_dsp_dump_ext_rom_status(struct snd_sof_dev *sdev, u32 flags)
|
||||
len += snprintf(msg + len, sizeof(msg) - len, " 0x%x", value);
|
||||
}
|
||||
|
||||
sof_dev_dbg_or_err(sdev->dev, flags & SOF_DBG_DUMP_FORCE_ERR_LEVEL,
|
||||
"extended rom status: %s", msg);
|
||||
dev_err(sdev->dev, "error: extended rom status: %s", msg);
|
||||
|
||||
}
|
||||
|
||||
|
@ -821,7 +821,7 @@ int snd_sof_run_firmware(struct snd_sof_dev *sdev)
|
||||
if (ret < 0) {
|
||||
dev_err(sdev->dev, "error: failed to start DSP\n");
|
||||
snd_sof_dsp_dbg_dump(sdev, SOF_DBG_DUMP_REGS | SOF_DBG_DUMP_MBOX |
|
||||
SOF_DBG_DUMP_PCI | SOF_DBG_DUMP_FORCE_ERR_LEVEL);
|
||||
SOF_DBG_DUMP_PCI);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -837,7 +837,7 @@ int snd_sof_run_firmware(struct snd_sof_dev *sdev)
|
||||
if (ret == 0) {
|
||||
dev_err(sdev->dev, "error: firmware boot failure\n");
|
||||
snd_sof_dsp_dbg_dump(sdev, SOF_DBG_DUMP_REGS | SOF_DBG_DUMP_MBOX |
|
||||
SOF_DBG_DUMP_TEXT | SOF_DBG_DUMP_PCI | SOF_DBG_DUMP_FORCE_ERR_LEVEL);
|
||||
SOF_DBG_DUMP_TEXT | SOF_DBG_DUMP_PCI);
|
||||
sdev->fw_state = SOF_FW_BOOT_FAILED;
|
||||
return -EIO;
|
||||
}
|
||||
|
@ -39,8 +39,7 @@
|
||||
#define SOF_DBG_DUMP_MBOX BIT(1)
|
||||
#define SOF_DBG_DUMP_TEXT BIT(2)
|
||||
#define SOF_DBG_DUMP_PCI BIT(3)
|
||||
#define SOF_DBG_DUMP_FORCE_ERR_LEVEL BIT(4) /* used to dump dsp status with error log level */
|
||||
#define SOF_DBG_DUMP_OPTIONAL BIT(5) /* only dump if SOF_DBG_PRINT_ALL_DUMPS is set */
|
||||
#define SOF_DBG_DUMP_OPTIONAL BIT(4) /* only dump if SOF_DBG_PRINT_ALL_DUMPS is set */
|
||||
|
||||
/* global debug state set by SOF_DBG_ flags */
|
||||
extern int sof_core_debug;
|
||||
@ -593,13 +592,4 @@ int intel_pcm_close(struct snd_sof_dev *sdev,
|
||||
struct snd_pcm_substream *substream);
|
||||
|
||||
int sof_machine_check(struct snd_sof_dev *sdev);
|
||||
|
||||
#define sof_dev_dbg_or_err(dev, is_err, fmt, ...) \
|
||||
do { \
|
||||
if (is_err) \
|
||||
dev_err(dev, "error: " fmt, __VA_ARGS__); \
|
||||
else \
|
||||
dev_dbg(dev, fmt, __VA_ARGS__); \
|
||||
} while (0)
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user