Patchwork [U-Boot,11/19] bootstage: Add stubs for new bootstage functions

login
register
mail settings
Submitter Simon Glass
Date April 18, 2013, 2:13 a.m.
Message ID <1366251228-19884-12-git-send-email-sjg@chromium.org>
Download mbox | patch
Permalink /patch/237416/
State Accepted, archived
Delegated to: Simon Glass
Headers show

Comments

Simon Glass - April 18, 2013, 2:13 a.m.
Some functions don't have a stub for when CONFIG_BOOTSTAGE is not defined.
Add one to avoid #ifdefs in the code when this is used in U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
---
 include/bootstage.h | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

Patch

diff --git a/include/bootstage.h b/include/bootstage.h
index 3b2216b..bdda768 100644
--- a/include/bootstage.h
+++ b/include/bootstage.h
@@ -315,6 +315,12 @@  int bootstage_stash(void *base, int size);
 int bootstage_unstash(void *base, int size);
 
 #else
+static inline ulong bootstage_add_record(enum bootstage_id id,
+		const char *name, int flags, ulong mark)
+{
+	return 0;
+}
+
 /*
  * This is a dummy implementation which just calls show_boot_progress(),
  * and won't even do that unless CONFIG_SHOW_BOOT_PROGRESS is defined
@@ -337,6 +343,16 @@  static inline ulong bootstage_mark_name(enum bootstage_id id, const char *name)
 	return 0;
 }
 
+static inline uint32_t bootstage_start(enum bootstage_id id, const char *name)
+{
+	return 0;
+}
+
+static inline uint32_t bootstage_accum(enum bootstage_id id)
+{
+	return 0;
+}
+
 static inline int bootstage_stash(void *base, int size)
 {
 	return 0;	/* Pretend to succeed */