public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] POST progress API
@ 2010-03-01  9:47 Michael Zaidman
  2010-03-08 15:29 ` Detlev Zundel
  2010-03-21 16:15 ` Wolfgang Denk
  0 siblings, 2 replies; 6+ messages in thread
From: Michael Zaidman @ 2010-03-01  9:47 UTC (permalink / raw)
  To: u-boot

Added POST progress API implemented as weak calls before and after
each call to the POST test callback in the post_run_single routine
of the post.c file.

Signed-off-by: Michael Zaidman <michael.zaidman@gmail.com>
---
 include/post.h |    5 +++++
 post/post.c    |   17 +++++++++++++++--
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/include/post.h b/include/post.h
index 9fcd3ce..ff83bce 100644
--- a/include/post.h
+++ b/include/post.h
@@ -53,6 +53,11 @@
 
 #define POST_FAIL_SAVE		0x80
 
+#define POST_BEFORE		1
+#define POST_AFTER		0
+#define POST_PASSED		1
+#define POST_FAILED		0
+
 #ifndef	__ASSEMBLY__
 
 struct post_test {
diff --git a/post/post.c b/post/post.c
index b29eb87..00e8353 100644
--- a/post/post.c
+++ b/post/post.c
@@ -231,6 +231,12 @@ static void post_get_flags (int *test_flags)
 	}
 }
 
+void __show_post_progress (unsigned int test_num, int before, int result)
+{
+}
+void show_post_progress (unsigned int, int, int)
+			__attribute__((weak, alias("__show_post_progress")));
+
 static int post_run_single (struct post_test *test,
 				int test_flags, int flags, unsigned int i)
 {
@@ -248,13 +254,18 @@ static int post_run_single (struct post_test *test,
 			if (test_flags & POST_PREREL)
 				post_log_mark_start ( test->testid );
 			else
-			post_log ("POST %s ", test->cmd);
+				post_log ("POST %s ", test->cmd);
 		}
 
+		show_post_progress(i, POST_BEFORE, POST_FAILED);
+
 		if (test_flags & POST_PREREL) {
-			if ((*test->test) (flags) == 0)
+			if ((*test->test) (flags) == 0) {
 				post_log_mark_succ ( test->testid );
+				show_post_progress(i, POST_AFTER, POST_PASSED);
+			}
 			else {
+				show_post_progress(i, POST_AFTER, POST_FAILED);
 				if (test_flags & POST_CRITICAL)
 					gd->flags |= GD_FLG_POSTFAIL;
 				if (test_flags & POST_STOP)
@@ -264,6 +275,7 @@ static int post_run_single (struct post_test *test,
 		if ((*test->test) (flags) != 0) {
 			post_log ("FAILED\n");
 			show_boot_progress (-32);
+			show_post_progress(i, POST_AFTER, POST_FAILED);
 			if (test_flags & POST_CRITICAL)
 				gd->flags |= GD_FLG_POSTFAIL;
 			if (test_flags & POST_STOP)
@@ -271,6 +283,7 @@ static int post_run_single (struct post_test *test,
 		}
 		else
 			post_log ("PASSED\n");
+			show_post_progress(i, POST_AFTER, POST_PASSED);
 		}
 
 		if ((test_flags & POST_REBOOT) && !(flags & POST_MANUAL)) {
-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] POST progress API
  2010-03-01  9:47 [U-Boot] [PATCH] POST progress API Michael Zaidman
@ 2010-03-08 15:29 ` Detlev Zundel
  2010-03-16 10:21   ` Michael Zaidman
  2010-03-21 16:15 ` Wolfgang Denk
  1 sibling, 1 reply; 6+ messages in thread
From: Detlev Zundel @ 2010-03-08 15:29 UTC (permalink / raw)
  To: u-boot

Hi Michael,

> Added POST progress API implemented as weak calls before and after
> each call to the POST test callback in the post_run_single routine
> of the post.c file.
>
> Signed-off-by: Michael Zaidman <michael.zaidman@gmail.com>

Acked-by: Detlev Zundel <dzu@denx.de>

Cheers
  Detlev

-- 
It's bad  civic hygiene to build  technologies that could  someday be used to
facilitate a police state.  No matter what the eavesdroppers and censors say,
these systems put us all at greater risk. Communications systems that have no
inherent  eavesdropping capabilities are more  secure than systems with those
capabilities built in.                                      -- Bruce Schneier
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] POST progress API
  2010-03-08 15:29 ` Detlev Zundel
@ 2010-03-16 10:21   ` Michael Zaidman
  2010-03-21 16:17     ` Wolfgang Denk
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Zaidman @ 2010-03-16 10:21 UTC (permalink / raw)
  To: u-boot

Hi Wolfgang,

Is there a chance this patch will be included already in this release?

On Mon, Mar 8, 2010 at 5:29 PM, Detlev Zundel <dzu@denx.de> wrote:
> Hi Michael,
>
>> Added POST progress API implemented as weak calls before and after
>> each call to the POST test callback in the post_run_single routine
>> of the post.c file.
>>
>> Signed-off-by: Michael Zaidman <michael.zaidman@gmail.com>
>
> Acked-by: Detlev Zundel <dzu@denx.de>
>
> Cheers
> ?Detlev

Thanks,
Michael

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] POST progress API
  2010-03-01  9:47 [U-Boot] [PATCH] POST progress API Michael Zaidman
  2010-03-08 15:29 ` Detlev Zundel
@ 2010-03-21 16:15 ` Wolfgang Denk
  1 sibling, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2010-03-21 16:15 UTC (permalink / raw)
  To: u-boot

Dear Michael Zaidman,

In message <1267436856-3933-1-git-send-email-michael.zaidman@gmail.com> you wrote:
> Added POST progress API implemented as weak calls before and after
> each call to the POST test callback in the post_run_single routine
> of the post.c file.
> 
> Signed-off-by: Michael Zaidman <michael.zaidman@gmail.com>
> ---
>  include/post.h |    5 +++++
>  post/post.c    |   17 +++++++++++++++--
>  2 files changed, 20 insertions(+), 2 deletions(-)

Applied to "next" branch.  Thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Thought for the day: What if there were no hypothetical situations?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] POST progress API
  2010-03-16 10:21   ` Michael Zaidman
@ 2010-03-21 16:17     ` Wolfgang Denk
  2010-03-21 16:37       ` Michael Zaidman
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2010-03-21 16:17 UTC (permalink / raw)
  To: u-boot

Dear Michael Zaidman,

In message <660c0f821003160321h1a5552dfh6cc835b48b00463e@mail.gmail.com> you wrote:
> 
> Is there a chance this patch will be included already in this release?

Sorry, but no. This is new code (i. e. not a bug fix) and thus has to
wait for the next merge window.  We pull it into the "next" branch now
so that it is in fact already on the fast-lane there.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A verbal contract isn't worth the paper it's written on.
                                                    -- Samuel Goldwyn

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] POST progress API
  2010-03-21 16:17     ` Wolfgang Denk
@ 2010-03-21 16:37       ` Michael Zaidman
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Zaidman @ 2010-03-21 16:37 UTC (permalink / raw)
  To: u-boot

On Sun, Mar 21, 2010 at 6:17 PM, Wolfgang Denk <wd@denx.de> wrote:
> Dear Michael Zaidman,
>
> In message <660c0f821003160321h1a5552dfh6cc835b48b00463e@mail.gmail.com> you wrote:
>>
>> Is there a chance this patch will be included already in this release?
>
> Sorry, but no. This is new code (i. e. not a bug fix) and thus has to
> wait for the next merge window. ?We pull it into the "next" branch now
> so that it is in fact already on the fast-lane there.
>
> Best regards,
>
> Wolfgang Denk

Thanks,
Michael

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-03-21 16:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-01  9:47 [U-Boot] [PATCH] POST progress API Michael Zaidman
2010-03-08 15:29 ` Detlev Zundel
2010-03-16 10:21   ` Michael Zaidman
2010-03-21 16:17     ` Wolfgang Denk
2010-03-21 16:37       ` Michael Zaidman
2010-03-21 16:15 ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox