summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/cbfs.h38
-rw-r--r--src/include/program_loading.h36
2 files changed, 36 insertions, 38 deletions
diff --git a/src/include/cbfs.h b/src/include/cbfs.h
index 2d09f4b36a..4911848fd2 100644
--- a/src/include/cbfs.h
+++ b/src/include/cbfs.h
@@ -76,43 +76,5 @@ void *cbfs_simple_buffer_unmap(struct cbfs_simple_buffer *buffer,
/* Defined in individual arch / board implementation. */
int init_default_cbfs_media(struct cbfs_media *media);
-#if defined(__PRE_RAM__)
-struct romstage_handoff;
-struct cbmem_entry;
-
-#if CONFIG_RELOCATABLE_RAMSTAGE && defined(__PRE_RAM__)
-/* The cache_loaded_ramstage() and load_cached_ramstage() functions are defined
- * to be weak so that board and chipset code may override them. Their job is to
- * cache and load the ramstage for quick S3 resume. By default a copy of the
- * relocated ramstage is saved using the cbmem infrastructure. These
- * functions are only valid during romstage. */
-
-/* The implementer of cache_loaded_ramstage() may use the romstage_handoff
- * structure to store information, but note that the handoff variable can be
- * NULL. The ramstage cbmem_entry represents the region occupied by the loaded
- * ramstage. */
-void cache_loaded_ramstage(struct romstage_handoff *handoff,
- const struct cbmem_entry *ramstage, void *entry_point);
-/* Return NULL on error or entry point on success. The ramstage cbmem_entry is
- * the region where to load the cached contents to. */
-void * load_cached_ramstage(struct romstage_handoff *handoff,
- const struct cbmem_entry *ramstage);
-#else /* CONFIG_RELOCATABLE_RAMSTAGE */
-
-static inline void cache_loaded_ramstage(struct romstage_handoff *handoff,
- const struct cbmem_entry *ramstage, void *entry_point)
-{
-}
-
-static inline void *
-load_cached_ramstage(struct romstage_handoff *handoff,
- const struct cbmem_entry *ramstage)
-{
- return NULL;
-}
-
-#endif /* CONFIG_RELOCATABLE_RAMSTAGE */
-#endif /* defined(__PRE_RAM__) */
-
#endif
diff --git a/src/include/program_loading.h b/src/include/program_loading.h
index 21d2c1eaf2..e071db9729 100644
--- a/src/include/program_loading.h
+++ b/src/include/program_loading.h
@@ -40,8 +40,44 @@ void run_romstage(void);
* RAMSTAGE LOADING *
************************/
+struct romstage_handoff;
struct cbmem_entry;
+#if defined(__PRE_RAM__)
+#if CONFIG_RELOCATABLE_RAMSTAGE
+/* The cache_loaded_ramstage() and load_cached_ramstage() functions are defined
+ * to be weak so that board and chipset code may override them. Their job is to
+ * cache and load the ramstage for quick S3 resume. By default a copy of the
+ * relocated ramstage is saved using the cbmem infrastructure. These
+ * functions are only valid during romstage. */
+
+/* The implementer of cache_loaded_ramstage() may use the romstage_handoff
+ * structure to store information, but note that the handoff variable can be
+ * NULL. The ramstage cbmem_entry represents the region occupied by the loaded
+ * ramstage. */
+void cache_loaded_ramstage(struct romstage_handoff *handoff,
+ const struct cbmem_entry *ramstage, void *entry_point);
+/* Return NULL on error or entry point on success. The ramstage cbmem_entry is
+ * the region where to load the cached contents to. */
+void * load_cached_ramstage(struct romstage_handoff *handoff,
+ const struct cbmem_entry *ramstage);
+#else /* CONFIG_RELOCATABLE_RAMSTAGE */
+
+static inline void cache_loaded_ramstage(struct romstage_handoff *handoff,
+ const struct cbmem_entry *ramstage, void *entry_point)
+{
+}
+
+static inline void *
+load_cached_ramstage(struct romstage_handoff *handoff,
+ const struct cbmem_entry *ramstage)
+{
+ return NULL;
+}
+
+#endif /* CONFIG_RELOCATABLE_RAMSTAGE */
+#endif /* defined(__PRE_RAM__) */
+
/* Run ramstage from romstage. */
void run_ramstage(void);