summaryrefslogtreecommitdiff
path: root/src/include/romstage_handoff.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/romstage_handoff.h')
-rw-r--r--src/include/romstage_handoff.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/include/romstage_handoff.h b/src/include/romstage_handoff.h
index 699838a260..307babd329 100644
--- a/src/include/romstage_handoff.h
+++ b/src/include/romstage_handoff.h
@@ -41,6 +41,7 @@ struct romstage_handoff {
};
#if defined(__PRE_RAM__)
+#if CONFIG_EARLY_CBMEM_INIT
/* The romstage_handoff_find_or_add() function provides the necessary logic
* for initializing the romstage_handoff structure in cbmem. Different components
* of the romstage may be responsible for setting up different fields. Therefore
@@ -63,7 +64,14 @@ static inline struct romstage_handoff *romstage_handoff_find_or_add(void)
return handoff;
}
-#endif
+#else /* CONFIG_EARLY_CBMEM_INIT */
+static inline struct romstage_handoff *romstage_handoff_find_or_add(void)
+{
+ return NULL;
+}
+#endif /* CONFIG_EARLY_CBMEM_INIT */
+
+#endif /* defined(__PRE_RAM__) */
#endif /* ROMSTAGE_HANDOFF_H */