Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions sound/soc/sof/intel/bdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,10 @@ static int bdw_fw_ready(struct snd_sof_dev *sdev, u32 msg_id)
" Firmware info: version %d:%d-%s build %d on %s:%s\n",
v->major, v->minor, v->tag, v->build, v->date, v->time);

/* only copy the fw_version into debugfs at first boot */
if (sdev->first_boot)
memcpy(&sdev->fw_version, v, sizeof(*v));

/* now check for extended data */
snd_sof_fw_parse_ext_data(sdev, MBOX_OFFSET +
sizeof(struct sof_ipc_fw_ready));
Expand Down
4 changes: 4 additions & 0 deletions sound/soc/sof/intel/byt.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,10 @@ static int byt_fw_ready(struct snd_sof_dev *sdev, u32 msg_id)
" Firmware info: version %d:%d-%s build %d on %s:%s\n",
v->major, v->minor, v->tag, v->build, v->date, v->time);

/* only copy the fw_version into debugfs at first boot */
if (sdev->first_boot)
memcpy(&sdev->fw_version, v, sizeof(*v));

/* now check for extended data */
snd_sof_fw_parse_ext_data(sdev, MBOX_OFFSET +
sizeof(struct sof_ipc_fw_ready));
Expand Down
4 changes: 4 additions & 0 deletions sound/soc/sof/intel/hda-ipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,10 @@ int hda_dsp_ipc_fw_ready(struct snd_sof_dev *sdev, u32 msg_id)
" Firmware info: version %d.%d-%s build %d on %s:%s\n",
v->major, v->minor, v->tag, v->build, v->date, v->time);

/* only copy the fw_version into debugfs at first boot */
if (sdev->first_boot)
memcpy(&sdev->fw_version, v, sizeof(*v));

/* now check for extended data */
snd_sof_fw_parse_ext_data(sdev, HDA_DSP_MBOX_UPLINK_OFFSET +
sizeof(struct sof_ipc_fw_ready));
Expand Down
4 changes: 4 additions & 0 deletions sound/soc/sof/intel/hsw.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,10 @@ static int hsw_fw_ready(struct snd_sof_dev *sdev, u32 msg_id)
" Firmware info: version %d:%d-%s build %d on %s:%s\n",
v->major, v->minor, v->tag, v->build, v->date, v->time);

/* only copy the fw_version into debugfs at first boot */
if (sdev->first_boot)
memcpy(&sdev->fw_version, v, sizeof(*v));

/* now check for extended data */
snd_sof_fw_parse_ext_data(sdev, MBOX_OFFSET +
sizeof(struct sof_ipc_fw_ready));
Expand Down
12 changes: 12 additions & 0 deletions sound/soc/sof/loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,18 @@ int snd_sof_run_firmware(struct snd_sof_dev *sdev)
init_waitqueue_head(&sdev->boot_wait);
sdev->boot_complete = false;

/* create fw_version debugfs to store boot version info */
if (sdev->first_boot) {
ret = snd_sof_debugfs_create_item(sdev, &sdev->fw_version,
sizeof(sdev->fw_version),
"fw_version");

if (ret < 0) {
dev_err(sdev->dev, "cannot create debugfs for fw_version\n");
return ret;
}
}

dev_dbg(sdev->dev, "booting DSP firmware\n");

/* boot the firmware on the DSP */
Expand Down
1 change: 1 addition & 0 deletions sound/soc/sof/sof-priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ struct snd_sof_dev {
int cl_bar;
struct snd_dma_buffer dmab;
struct sof_ipc_fw_ready fw_ready;
struct sof_ipc_fw_version fw_version;

/* topology */
struct snd_soc_tplg_ops *tplg_ops;
Expand Down