intel_adsp: ace: power: fix build error with asserts enabled
If defined(CONFIG_ASSERT) and !defined(CONFIG_ADSP_IMR_CONTEXT_SAVE),
build will fail as symbol "global_imr_ram_storage" is not defined.
Link: https://github.com/thesofproject/sof/issues/6896
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
diff --git a/soc/xtensa/intel_adsp/ace/power.c b/soc/xtensa/intel_adsp/ace/power.c
index 0a1ea43..016d5aa 100644
--- a/soc/xtensa/intel_adsp/ace/power.c
+++ b/soc/xtensa/intel_adsp/ace/power.c
@@ -224,8 +224,10 @@
soc_cpus_active[cpu] = false;
z_xtensa_cache_flush_inv_all();
if (cpu == 0) {
+#ifdef CONFIG_ADSP_IMR_CONTEXT_SAVE
/* save storage and restore information to imr */
__ASSERT_NO_MSG(global_imr_ram_storage != NULL);
+#endif
struct imr_layout *imr_layout = (struct imr_layout *)(IMR_LAYOUT_ADDRESS);
imr_layout->imr_state.header.adsp_imr_magic = ADSP_IMR_MAGIC_VALUE;