summaryrefslogtreecommitdiffstats
path: root/sound/soc/sof
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>2022-04-25 15:11:20 -0700
committerMark Brown <broonie@kernel.org>2022-04-29 13:06:07 +0100
commit61bafd1c4571ceb9cdf1830a257eac873d0b68ee (patch)
tree131da14b8074a4d2e8dbebd57edf0c20667a812b /sound/soc/sof
parentce216cfa84a4e1c23b105e652c550bdeaac9e922 (diff)
downloadlinux-stable-61bafd1c4571ceb9cdf1830a257eac873d0b68ee.tar.gz
linux-stable-61bafd1c4571ceb9cdf1830a257eac873d0b68ee.tar.bz2
linux-stable-61bafd1c4571ceb9cdf1830a257eac873d0b68ee.zip
ASoC: SOF: Introduce IPC dependent ops for firmware handling, loading
The parsing and loading of firmware modules/components are IPC dependent operations as the organization of the firmware depends on the IPC it is supporting. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20220425221129.124615-2-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof')
-rw-r--r--sound/soc/sof/sof-priv.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/sound/soc/sof/sof-priv.h b/sound/soc/sof/sof-priv.h
index 382187e89e54..1df0b1473661 100644
--- a/sound/soc/sof/sof-priv.h
+++ b/sound/soc/sof/sof-priv.h
@@ -364,6 +364,25 @@ struct sof_ipc_pm_ops {
int (*ctx_restore)(struct snd_sof_dev *sdev);
};
+/**
+ * struct sof_ipc_fw_loader_ops - IPC/FW-specific loader ops
+ * @validate: Function pointer for validating the firmware image
+ * @parse_ext_manifest: Function pointer for parsing the manifest of the firmware
+ * @load_fw_to_dsp: Optional function pointer for loading the firmware to the
+ * DSP.
+ * The function implements generic, hardware independent way
+ * of loading the initial firmware and its modules (if any).
+ * @query_fw_configuration: Optional function pointer to query information and
+ * configuration from the booted firmware.
+ * Executed after the first successful firmware boot.
+ */
+struct sof_ipc_fw_loader_ops {
+ int (*validate)(struct snd_sof_dev *sdev);
+ size_t (*parse_ext_manifest)(struct snd_sof_dev *sdev);
+ int (*load_fw_to_dsp)(struct snd_sof_dev *sdev);
+ int (*query_fw_configuration)(struct snd_sof_dev *sdev);
+};
+
struct sof_ipc_tplg_ops;
struct sof_ipc_pcm_ops;
@@ -372,6 +391,7 @@ struct sof_ipc_pcm_ops;
* @tplg: Pointer to IPC-specific topology ops
* @pm: Pointer to PM ops
* @pcm: Pointer to PCM ops
+ * @fw_loader: Pointer to Firmware Loader ops
*
* @tx_msg: Function pointer for sending a 'short' IPC message
* @set_get_data: Function pointer for set/get data ('large' IPC message). This
@@ -391,6 +411,7 @@ struct sof_ipc_ops {
const struct sof_ipc_tplg_ops *tplg;
const struct sof_ipc_pm_ops *pm;
const struct sof_ipc_pcm_ops *pcm;
+ const struct sof_ipc_fw_loader_ops *fw_loader;
int (*tx_msg)(struct snd_sof_dev *sdev, void *msg_data, size_t msg_bytes,
void *reply_data, size_t reply_bytes, bool no_pm);