Commit f690cdcc authored by Yong Zhi's avatar Yong Zhi Committed by Mark Brown

ASoC: SOF: ipc4-loader: save FW version info to debugfs

To check loaded FW version:

$ hexdump -C /sys/kernel/debug/sof/fw_version
00000000  02 00 07 00 63 00 01 00  00 00 00 00 00 00 00 00  |....c...........|
Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: default avatarYong Zhi <yong.zhi@intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://msgid.link/r/20240402145959.172619-2-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 2ae143fb
...@@ -80,6 +80,14 @@ static ssize_t sof_ipc4_fw_parse_ext_man(struct snd_sof_dev *sdev, ...@@ -80,6 +80,14 @@ static ssize_t sof_ipc4_fw_parse_ext_man(struct snd_sof_dev *sdev,
dev_dbg(sdev->dev, "Header length: %u, module count: %u\n", dev_dbg(sdev->dev, "Header length: %u, module count: %u\n",
fw_header->len, fw_header->num_module_entries); fw_header->len, fw_header->num_module_entries);
/* copy the fw_version of basefw into debugfs at first boot */
if (fw == sdev->basefw.fw) {
sdev->fw_version.major = fw_header->major_version;
sdev->fw_version.minor = fw_header->minor_version;
sdev->fw_version.micro = fw_header->hotfix_version;
sdev->fw_version.build = fw_header->build_version;
}
fw_lib->modules = devm_kmalloc_array(sdev->dev, fw_header->num_module_entries, fw_lib->modules = devm_kmalloc_array(sdev->dev, fw_header->num_module_entries,
sizeof(*fw_module), GFP_KERNEL); sizeof(*fw_module), GFP_KERNEL);
if (!fw_lib->modules) if (!fw_lib->modules)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment