diff options
author | Simon Glass <sjg@chromium.org> | 2012-09-28 12:56:35 +0400 |
---|---|---|
committer | Anatolij Gustschin <agust@denx.de> | 2012-10-03 00:39:33 +0400 |
commit | 094e06a523ba040f81857609f9d889b4b57ee151 (patch) | |
tree | b3363e28ba02801492223454c5fa163a4815f1ad /common/bootstage.c | |
parent | 221953d41dea8dce027b9ce6beee700d97ac2c83 (diff) | |
download | u-boot-094e06a523ba040f81857609f9d889b4b57ee151.tar.xz |
bootstage: Export bootstage_add_record() function
This function is not static, but not exported either. Add a prototype
in the header file and move the required enum to the header also.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/bootstage.c')
-rw-r--r-- | common/bootstage.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/common/bootstage.c b/common/bootstage.c index 4e01d92076..3275499b5c 100644 --- a/common/bootstage.c +++ b/common/bootstage.c @@ -33,13 +33,9 @@ DECLARE_GLOBAL_DATA_PTR; -enum bootstage_flags { - BOOTSTAGEF_ERROR = 1 << 0, /* Error record */ - BOOTSTAGEF_ALLOC = 1 << 1, /* Allocate an id */ -}; - struct bootstage_record { ulong time_us; + uint32_t start_us; const char *name; int flags; /* see enum bootstage_flags */ enum bootstage_id id; @@ -49,10 +45,9 @@ static struct bootstage_record record[BOOTSTAGE_ID_COUNT] = { {1} }; static int next_id = BOOTSTAGE_ID_USER; ulong bootstage_add_record(enum bootstage_id id, const char *name, - int flags) + int flags, ulong mark) { struct bootstage_record *rec; - ulong mark = timer_get_boot_us(); if (flags & BOOTSTAGEF_ALLOC) id = next_id++; @@ -77,12 +72,13 @@ ulong bootstage_add_record(enum bootstage_id id, const char *name, ulong bootstage_mark(enum bootstage_id id) { - return bootstage_add_record(id, NULL, 0); + return bootstage_add_record(id, NULL, 0, timer_get_boot_us()); } ulong bootstage_error(enum bootstage_id id) { - return bootstage_add_record(id, NULL, BOOTSTAGEF_ERROR); + return bootstage_add_record(id, NULL, BOOTSTAGEF_ERROR, + timer_get_boot_us()); } ulong bootstage_mark_name(enum bootstage_id id, const char *name) @@ -91,7 +87,7 @@ ulong bootstage_mark_name(enum bootstage_id id, const char *name) if (id == BOOTSTAGE_ID_ALLOC) flags = BOOTSTAGEF_ALLOC; - return bootstage_add_record(id, name, flags); + return bootstage_add_record(id, name, flags, timer_get_boot_us()); } static void print_time(unsigned long us_time) |