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 8/8] km_arm: enable POST for these boards
Date: Thu,  1 Sep 2011 17:39:27 +0200	[thread overview]
Message-ID: <1314891567-6476-9-git-send-email-valentin.longchamp@keymile.com> (raw)
In-Reply-To: <1314891567-6476-1-git-send-email-valentin.longchamp@keymile.com>

The current km_arm boards have a Power-On test jumper. When this
jumper is set, this triggers some Power-On tests on the board.

This patch enables the support of this jumper for starting the
memory_regions test when the jumper is set.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
---
Changes for v2:
 - adapted to CONFIG_POST_EXTERNAL_WORD_FUNCS
 - implemented suggestion from Sergei
---
 board/keymile/km_arm/km_arm.c |   22 ++++++++++++++++++++++
 include/configs/km/km_arm.h   |    6 ++++++
 2 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/board/keymile/km_arm/km_arm.c b/board/keymile/km_arm/km_arm.c
index 69f86f5..a1e26ae 100644
--- a/board/keymile/km_arm/km_arm.c
+++ b/board/keymile/km_arm/km_arm.c
@@ -483,6 +483,28 @@ int get_scl(void)
 }
 #endif
 
+#if defined(CONFIG_POST)
+
+#define KM_POST_EN_L   44
+
+int post_hotkeys_pressed(void)
+{
+	return !kw_gpio_get_value(KM_POST_EN_L);
+}
+
+ulong post_word_load(void)
+{
+	volatile void* addr = (void *) (gd->ram_size - BOOTCOUNT_ADDR + 4);
+	return in_le32(addr);
+
+}
+void post_word_store(ulong value)
+{
+	volatile void* addr = (void *) (gd->ram_size - BOOTCOUNT_ADDR + 4);
+	out_le32(addr, value);
+}
+#endif
+
 #if defined(CONFIG_SYS_EEPROM_WREN)
 int eeprom_write_enable(unsigned dev_addr, int state)
 {
diff --git a/include/configs/km/km_arm.h b/include/configs/km/km_arm.h
index 54c13ce..82275a6 100644
--- a/include/configs/km/km_arm.h
+++ b/include/configs/km/km_arm.h
@@ -271,4 +271,10 @@ int get_scl(void);
 /* address for the bootcount (taken from end of RAM) */
 #define BOOTCOUNT_ADDR          (CONFIG_KM_RESERVED_PRAM)
 
+/* enable POST tests with log */
+#define CONFIG_POST	(CONFIG_SYS_POST_MEM_REGIONS)
+#define CONFIG_POST_SKIP_ENV_FLAGS
+#define CONFIG_POST_EXTERNAL_WORD_FUNCS
+#define CONFIG_CMD_DIAG
+
 #endif /* _CONFIG_KM_ARM_H */
-- 
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 ` [U-Boot] [PATCH v2 3/8] POST: make env test flags fetching optional Valentin Longchamp
2011-09-01 22:12   ` 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 ` Valentin Longchamp [this message]

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-9-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.