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 3/8] kmp204x: selftest/factory test pin support
Date: Wed, 30 Apr 2014 15:01:44 +0200	[thread overview]
Message-ID: <1398862909-17580-4-git-send-email-valentin.longchamp@keymile.com> (raw)
In-Reply-To: <1398862909-17580-1-git-send-email-valentin.longchamp@keymile.com>

This patch defines the post_hotkeys_pressed() function that is used for:
- triggering POST memory regions test
- starting the test application through the checktestboot command in
  a script by setting the active bank to testbank

The post_hotkeys_pressed return the state of the SELFTEST pin.

The patch moves from the complete POST-memory test that is too long in
its SLOW version for our production HW test procedure to the much shorter
POST-memory-regions test.

Finally, the unused #defines for the not so relevant mtest command are
removed.

Signed-off-by: Stefan Bigler <stefan.bigler@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
---

 board/keymile/kmp204x/kmp204x.c     | 13 +++++++++++++
 include/configs/km/kmp204x-common.h |  6 +-----
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/board/keymile/kmp204x/kmp204x.c b/board/keymile/kmp204x/kmp204x.c
index fba1bdd..1ce8429 100644
--- a/board/keymile/kmp204x/kmp204x.c
+++ b/board/keymile/kmp204x/kmp204x.c
@@ -250,3 +250,16 @@ void ft_board_setup(void *blob, bd_t *bd)
 	fdt_fixup_fman_mac_addresses(blob);
 #endif
 }
+
+#if defined(CONFIG_POST)
+
+/* DIC26_SELFTEST GPIO used to start factory test sw */
+#define SELFTEST_PORT	GPIO_A
+#define SELFTEST_PIN	31
+
+int post_hotkeys_pressed(void)
+{
+	qrio_gpio_direction_input(SELFTEST_PORT, SELFTEST_PIN);
+	return qrio_get_gpio(SELFTEST_PORT, SELFTEST_PIN);
+}
+#endif
diff --git a/include/configs/km/kmp204x-common.h b/include/configs/km/kmp204x-common.h
index 582978a..913084f 100644
--- a/include/configs/km/kmp204x-common.h
+++ b/include/configs/km/kmp204x-common.h
@@ -85,11 +85,7 @@ unsigned long get_board_sys_clk(unsigned long dummy);
 #define CONFIG_ADDR_MAP
 #define CONFIG_SYS_NUM_ADDR_MAP		64	/* number of TLB1 entries */
 
-#define CONFIG_POST CONFIG_SYS_POST_MEMORY	/* test POST memory test */
-#define CONFIG_SYS_MEMTEST_START	0x00100000	/* memtest works on */
-#define CONFIG_SYS_MEMTEST_END		0x00800000
-#define CONFIG_SYS_ALT_MEMTEST
-#define CONFIG_PANIC_HANG	/* do not reset board on panic */
+#define CONFIG_POST CONFIG_SYS_POST_MEM_REGIONS	/* POST memory regions test */
 
 /*
  *  Config the L3 Cache as L3 SRAM
-- 
1.8.0.1

  parent reply	other threads:[~2014-04-30 13:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-30 13:01 [U-Boot] [PATCH 0/8] kmp204x patches for 2014.07 Valentin Longchamp
2014-04-30 13:01 ` [U-Boot] [PATCH 1/8] kmp204x: Add support for the unit LEDs Valentin Longchamp
2014-04-30 17:04   ` York Sun
2014-05-01 14:00     ` Valentin Longchamp
2014-05-01 15:47       ` York Sun
2014-05-02  8:48   ` [U-Boot] [PATCH v2 " Valentin Longchamp
2014-04-30 13:01 ` [U-Boot] [PATCH 2/8] kmp204x: handle dip-switch for factory settings Valentin Longchamp
2014-04-30 17:04   ` York Sun
2014-05-02  8:49   ` [U-Boot] [PATCH v2 " Valentin Longchamp
2014-04-30 13:01 ` Valentin Longchamp [this message]
2014-04-30 13:01 ` [U-Boot] [PATCH 4/8] kmp204x: update the CONFIG_PRAM and CONFIG_KM_RESERVED_PRAM defines Valentin Longchamp
2014-04-30 13:01 ` [U-Boot] [PATCH 5/8] kmp204x: complete the reset sequence and PRST configuration Valentin Longchamp
2014-04-30 13:01 ` [U-Boot] [PATCH 6/8] kmp204x: update the RCW Valentin Longchamp
2014-04-30 13:01 ` [U-Boot] [PATCH 7/8] kmp204x: add workaround for A-004849 Valentin Longchamp
2014-04-30 13:01 ` [U-Boot] [PATCH 8/8] kmp204x: enable the errata command Valentin Longchamp
2014-05-13 16:38 ` [U-Boot] [PATCH 0/8] kmp204x patches for 2014.07 York Sun

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=1398862909-17580-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.