diff options
author | Valentin Longchamp <valentin.longchamp@keymile.com> | 2011-08-03 02:37:01 (GMT) |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-10-05 20:03:10 (GMT) |
commit | 79843950b26980cc0a62954bf49509de301607f3 (patch) | |
tree | fbfb2b49a38f92bf7b1c6b427f3b8c7ed6e4dde1 /post | |
parent | 3e161ced8fd3276aa77e4276e9237ae972b21f33 (diff) | |
download | u-boot-79843950b26980cc0a62954bf49509de301607f3.tar.xz |
POST: add post_log_res field for post results in global data
The current post_log_word in global data is currently split into 2x
16 bits: half for the test start, half for the test success.
Since we alredy have more than 16 POST tests defined and more could
be defined, this may result in an overflow and the post_output_backlog
would not work for the tests defined further of these 16 positions.
An additional field is added to global data so that we can now support up
to 32 (depending of architecture) tests. The post_log_word is only used
to record the start of the test and the new field post_log_res for the
test success (or failure). The post_output_backlog is for this change
also adapted.
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Diffstat (limited to 'post')
-rw-r--r-- | post/post.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/post/post.c b/post/post.c index 852d6a5..61acf8d 100644 --- a/post/post.c +++ b/post/post.c @@ -121,6 +121,7 @@ void post_bootmode_init (void) /* Reset activity record */ gd->post_log_word = 0; + gd->post_log_res = 0; } int post_bootmode_get (unsigned int *last_test) @@ -144,12 +145,12 @@ int post_bootmode_get (unsigned int *last_test) /* POST tests run before relocation only mark status bits .... */ static void post_log_mark_start ( unsigned long testid ) { - gd->post_log_word |= (testid)<<16; + gd->post_log_word |= testid; } static void post_log_mark_succ ( unsigned long testid ) { - gd->post_log_word |= testid; + gd->post_log_res |= testid; } /* ... and the messages are output once we are relocated */ @@ -158,9 +159,9 @@ void post_output_backlog ( void ) int j; for (j = 0; j < post_list_size; j++) { - if (gd->post_log_word & (post_list[j].testid<<16)) { + if (gd->post_log_word & (post_list[j].testid)) { post_log ("POST %s ", post_list[j].cmd); - if (gd->post_log_word & post_list[j].testid) + if (gd->post_log_res & post_list[j].testid) post_log ("PASSED\n"); else { post_log ("FAILED\n"); |