]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - include/bootstage.h
bootstage: Convert to use malloc()
[people/ms/u-boot.git] / include / bootstage.h
index 6ee923c2ebd606f21ea578f5c188559d8eeb04d6..e1aec1b549c0cbd689d319474c84c3bfa0276478 100644 (file)
@@ -331,6 +331,14 @@ int bootstage_stash(void *base, int size);
  */
 int bootstage_unstash(void *base, int size);
 
+/**
+ * bootstage_init() - Prepare bootstage for use
+ *
+ * @first: true if this is the first time bootstage is set up. This causes it
+ *     to add a 'reset' record with a time of 0.
+ */
+int bootstage_init(bool first);
+
 #else
 static inline ulong bootstage_add_record(enum bootstage_id id,
                const char *name, int flags, ulong mark)
@@ -391,6 +399,11 @@ static inline int bootstage_unstash(void *base, int size)
 {
        return 0;       /* Pretend to succeed */
 }
+
+static inline int bootstage_init(bool first)
+{
+       return 0;
+}
 #endif /* CONFIG_BOOTSTAGE */
 
 /* Helper macro for adding a bootstage to a line of code */