diff mbox series

[09/20] ASoC: SOF: Move the definition of enum snd_sof_fw_state to global header

Message ID 20211223113628.18582-10-peter.ujfalusi@linux.intel.com
State Accepted
Commit fc179420fde3821c4d191e81b4f7b05c1dab87e2
Headers show
Series ASoC: SOF: Re-visit firmware state and panic tracking/handling | expand

Commit Message

Peter Ujfalusi Dec. 23, 2021, 11:36 a.m. UTC
Move the enum snd_sof_fw_state to include/sound/sof.h to be accessible
outside of the core SOF stack.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Paul Olaru <paul.olaru@oss.nxp.com>
---
 include/sound/sof.h      | 22 ++++++++++++++++++++++
 sound/soc/sof/sof-priv.h | 11 -----------
 2 files changed, 22 insertions(+), 11 deletions(-)
diff mbox series

Patch

diff --git a/include/sound/sof.h b/include/sound/sof.h
index 23b374311d16..b9131c01eefd 100644
--- a/include/sound/sof.h
+++ b/include/sound/sof.h
@@ -17,6 +17,28 @@ 
 
 struct snd_sof_dsp_ops;
 
+/**
+ * enum snd_sof_fw_state - DSP firmware state definitions
+ * @SOF_FW_BOOT_NOT_STARTED:	firmware boot is not yet started
+ * @SOF_FW_BOOT_PREPARE:	preparing for boot (firmware loading for exaqmple)
+ * @SOF_FW_BOOT_IN_PROGRESS:	firmware boot is in progress
+ * @SOF_FW_BOOT_FAILED:		firmware boot failed
+ * @SOF_FW_BOOT_READY_FAILED:	firmware booted but fw_ready op failed
+ * @SOF_FW_BOOT_READY_OK:	firmware booted and fw_ready op passed
+ * @SOF_FW_BOOT_COMPLETE:	firmware is booted up and functional
+ * @SOF_FW_CRASHED:		firmware crashed after successful boot
+ */
+enum snd_sof_fw_state {
+	SOF_FW_BOOT_NOT_STARTED = 0,
+	SOF_FW_BOOT_PREPARE,
+	SOF_FW_BOOT_IN_PROGRESS,
+	SOF_FW_BOOT_FAILED,
+	SOF_FW_BOOT_READY_FAILED,
+	SOF_FW_BOOT_READY_OK,
+	SOF_FW_BOOT_COMPLETE,
+	SOF_FW_CRASHED,
+};
+
 /*
  * SOF Platform data.
  */
diff --git a/sound/soc/sof/sof-priv.h b/sound/soc/sof/sof-priv.h
index c92103a028ff..a1ebc89b216a 100644
--- a/sound/soc/sof/sof-priv.h
+++ b/sound/soc/sof/sof-priv.h
@@ -375,17 +375,6 @@  struct snd_sof_ipc_msg {
 	bool ipc_complete;
 };
 
-enum snd_sof_fw_state {
-	SOF_FW_BOOT_NOT_STARTED = 0,
-	SOF_FW_BOOT_PREPARE,
-	SOF_FW_BOOT_IN_PROGRESS,
-	SOF_FW_BOOT_FAILED,
-	SOF_FW_BOOT_READY_FAILED, /* firmware booted but fw_ready op failed */
-	SOF_FW_BOOT_READY_OK,
-	SOF_FW_BOOT_COMPLETE,
-	SOF_FW_CRASHED,
-};
-
 /*
  * SOF Device Level.
  */