From patchwork Wed Aug 3 12:37:07 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentin Longchamp X-Patchwork-Id: 108151 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 1FEC9B71DB for ; Wed, 3 Aug 2011 22:38:04 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7717D2837B; Wed, 3 Aug 2011 14:37:44 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id D4ruwDcGG03z; Wed, 3 Aug 2011 14:37:44 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 329A42832F; Wed, 3 Aug 2011 14:37:24 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9427A28303 for ; Wed, 3 Aug 2011 14:37:17 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gBh7GgGqdMP4 for ; Wed, 3 Aug 2011 14:37:17 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail.ch.keymile.com (mail.ch.keymile.com [193.17.201.103]) by theia.denx.de (Postfix) with SMTP id D03B02831B for ; Wed, 3 Aug 2011 14:37:12 +0200 (CEST) Received: from SRVCHBER1212.ch.keymile.net ([172.31.32.9]) by eSafe SMTP Relay 1310478291; Wed, 03 Aug 2011 14:22:13 +0200 Received: from chber1-10533x.ch.keymile.net ([172.31.40.3]) by SRVCHBER1212.ch.keymile.net with Microsoft SMTPSVC(6.0.3790.4675); Wed, 3 Aug 2011 14:37:09 +0200 From: Valentin Longchamp To: u-boot@lists.denx.de Date: Wed, 3 Aug 2011 14:37:07 +0200 Message-Id: <1312375027-27693-9-git-send-email-valentin.longchamp@keymile.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1312375027-27693-1-git-send-email-valentin.longchamp@keymile.com> References: <1312375027-27693-1-git-send-email-valentin.longchamp@keymile.com> X-OriginalArrivalTime: 03 Aug 2011 12:37:09.0550 (UTC) FILETIME=[0FBA74E0:01CC51DA] X-ESAFE-STATUS: Mail allowed X-ESAFE-DETAILS: Cc: Valentin Longchamp , holger.brunck@keymile.com Subject: [U-Boot] [PATCH 8/8] km_arm: enable POST for these boards X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 Signed-off-by: Holger Brunck --- board/keymile/km_arm/km_arm.c | 11 +++++++++++ include/configs/km/km_arm.h | 8 ++++++++ 2 files changed, 19 insertions(+), 0 deletions(-) diff --git a/board/keymile/km_arm/km_arm.c b/board/keymile/km_arm/km_arm.c index a8f2b23..f12c730 100644 --- a/board/keymile/km_arm/km_arm.c +++ b/board/keymile/km_arm/km_arm.c @@ -448,6 +448,17 @@ int get_scl(void) } #endif +#if defined(CONFIG_POST) + +#define KM_POST_EN_L 44 + +int post_hotkeys_pressed(void) +{ + int val = kw_gpio_get_value(KM_POST_EN_L); + return !val; +} +#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..64ab140 100644 --- a/include/configs/km/km_arm.h +++ b/include/configs/km/km_arm.h @@ -271,4 +271,12 @@ 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_CMD_DIAG + +/* we take the address after the bootcounter */ +#define CONFIG_SYS_POST_WORD_ADDR ((gd->ram_size) - BOOTCOUNT_ADDR + 4) + #endif /* _CONFIG_KM_ARM_H */