All of lore.kernel.org
 help / color / mirror / Atom feed
From: Valentin Longchamp <valentin.longchamp@keymile.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 3/8] POST: make env test flags fetching optional
Date: Thu,  1 Sep 2011 17:39:22 +0200	[thread overview]
Message-ID: <1314891567-6476-4-git-send-email-valentin.longchamp@keymile.com> (raw)
In-Reply-To: <1314891567-6476-1-git-send-email-valentin.longchamp@keymile.com>

Some boards have the environment variables defined in a slow EEPROM. post_run
accesses these environment variables to define which tests have to be run (in
post_get_flags). This is very slow before the code relocation on some boards
with a slow I2C EEPROM for environement variables.

This patch adds a config option to skip the fetching of the test flags in the
environment variables. The test flags assigned to the tests then only are the
ones statically defined for the test in post/tests.c.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
---
 post/post.c |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/post/post.c b/post/post.c
index 03c521f..8b2cb3c 100644
--- a/post/post.c
+++ b/post/post.c
@@ -170,7 +170,8 @@ static void post_bootmode_test_off (void)
 	post_word_store (word);
 }
 
-static void post_get_flags (int *test_flags)
+#ifndef CONFIG_POST_SKIP_ENV_FLAGS
+static void post_get_env_flags(int *test_flags)
 {
 	int  flag[] = {  POST_POWERON,   POST_NORMAL,   POST_SLOWTEST,
 			 POST_CRITICAL };
@@ -183,10 +184,6 @@ static void post_get_flags (int *test_flags)
 	int last;
 	int i, j;
 
-	for (j = 0; j < post_list_size; j++) {
-		test_flags[j] = post_list[j].flags;
-	}
-
 	for (i = 0; i < varnum; i++) {
 		if (getenv_f(var[i], list, sizeof (list)) <= 0)
 			continue;
@@ -224,6 +221,19 @@ static void post_get_flags (int *test_flags)
 			name = s + 1;
 		}
 	}
+}
+#endif
+
+static void post_get_flags(int *test_flags)
+{
+	int j;
+
+	for (j = 0; j < post_list_size; j++)
+		test_flags[j] = post_list[j].flags;
+
+#ifndef CONFIG_POST_SKIP_ENV_FLAGS
+	post_get_env_flags(test_flags);
+#endif
 
 	for (j = 0; j < post_list_size; j++) {
 		if (test_flags[j] & POST_POWERON) {
-- 
1.7.1

  parent reply	other threads:[~2011-09-01 15:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-01 15:39 [U-Boot] [PATCH v2 0/8] POST: support for km_arm and mem_regions test definition Valentin Longchamp
2011-09-01 15:39 ` [U-Boot] [PATCH v2 1/8] POST/arm: adaptations needed for POST on ARM to work Valentin Longchamp
2011-09-01 22:11   ` Mike Frysinger
2011-09-02 12:31     ` Valentin Longchamp
2011-09-01 15:39 ` [U-Boot] [PATCH v2 2/8] POST: add post_log_res field for post results in global data Valentin Longchamp
2011-09-01 22:12   ` Mike Frysinger
2011-09-01 22:35     ` Graeme Russ
2011-09-01 15:39 ` Valentin Longchamp [this message]
2011-09-01 22:12   ` [U-Boot] [PATCH v2 3/8] POST: make env test flags fetching optional Mike Frysinger
2011-09-01 15:39 ` [U-Boot] [PATCH v2 4/8] POST: drivers/memory.c coding style cleanup Valentin Longchamp
2011-09-01 15:39 ` [U-Boot] [PATCH v2 5/8] POST: add new memory regions test Valentin Longchamp
2011-09-01 22:09   ` Mike Frysinger
2011-09-01 15:39 ` [U-Boot] [PATCH v2 6/8] POST/km_arm: add POST memory tests infrastructure Valentin Longchamp
2011-09-01 22:10   ` Mike Frysinger
2011-09-02 12:39     ` Valentin Longchamp
2011-09-02 15:25       ` Mike Frysinger
2011-09-01 15:39 ` [U-Boot] [PATCH v2 7/8] km_arm: change CONFIG_SYS_TEXT_BASE to end of RAM Valentin Longchamp
2011-09-01 15:39 ` [U-Boot] [PATCH v2 8/8] km_arm: enable POST for these boards Valentin Longchamp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1314891567-6476-4-git-send-email-valentin.longchamp@keymile.com \
    --to=valentin.longchamp@keymile.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.