From patchwork Sun Jul 7 10:25:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Frederic Leroy X-Patchwork-Id: 257319 X-Patchwork-Delegate: trini@ti.com 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 31D9D2C00A0 for ; Sun, 7 Jul 2013 20:25:58 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 42E4E4A03B; Sun, 7 Jul 2013 12:25:55 +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 kGyXkP2faDgp; Sun, 7 Jul 2013 12:25:55 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 967794A030; Sun, 7 Jul 2013 12:25:53 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 555E24A030 for ; Sun, 7 Jul 2013 12:25:51 +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 jFH4qbsTt3k8 for ; Sun, 7 Jul 2013 12:25:45 +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 sd-34071.dedibox.fr (sd-34071.dedibox.fr [88.191.154.35]) by theia.denx.de (Postfix) with ESMTP id 5744C4A02F for ; Sun, 7 Jul 2013 12:25:39 +0200 (CEST) Received: from sd-34071.dedibox.fr (localhost [127.0.0.1]) by sd-34071.dedibox.fr (Postfix) with ESMTP id 054213FEF6; Sun, 7 Jul 2013 12:25:38 +0200 (CEST) Received: from localhost.localdomain (4.139.116.78.rev.sfr.net [78.116.139.4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sd-34071.dedibox.fr (Postfix) with ESMTPSA id 91E003FEF4; Sun, 7 Jul 2013 12:25:37 +0200 (CEST) From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Leroy?= To: Joe Hershberger , U-Boot discussion Date: Sun, 7 Jul 2013 12:25:36 +0200 Message-Id: <1373192736-5014-1-git-send-email-fredo@starox.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <201306202000.12744.michael@walle.cc> References: <201306202000.12744.michael@walle.cc> MIME-Version: 1.0 X-Virus-Scanned: ClamAV using ClamSMTP Subject: [U-Boot] [PATCH] Enable serial console only before booting X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de When netconsole is active, some boards fail to boot. This patch enables only the serial console before control is handed by another operating system. Signed-off-by: Frédéric Leroy --- Hello, I am facing the same problem with LaCie kirkwood boards. I took a simple approach for fixing this issue. This works for me ... Any comments are welcome :) Frédéric common/cmd_bootm.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 15f4599..81e8322 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -62,6 +62,17 @@ #include #endif /* CONFIG_LZO */ + +#if defined(CONFIG_NETCONSOLE) +#include +void console_set_serial_unconditionally(void) +{ + iomux_doenv(stdin, "serial"); + iomux_doenv(stdout, "serial"); + iomux_doenv(stderr, "serial"); +} +#endif + DECLARE_GLOBAL_DATA_PTR; #ifndef CONFIG_SYS_BOOTM_LEN @@ -577,6 +588,7 @@ static int do_bootm_subcommand(cmd_tbl_t *cmdtp, int flag, int argc, * Stop the ethernet stack if NetConsole could have * left it up */ + console_set_serial_unconditionally("nc"); eth_halt(); #endif arch_preboot_os(); @@ -645,6 +657,7 @@ int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #ifdef CONFIG_NETCONSOLE /* Stop the ethernet stack if NetConsole could have left it up */ + console_set_serial_unconditionally("nc"); eth_halt(); #endif @@ -1849,6 +1862,7 @@ static int do_bootz(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #ifdef CONFIG_NETCONSOLE /* Stop the ethernet stack if NetConsole could have left it up */ + console_set_serial_unconditionally("nc"); eth_halt(); #endif