public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] vision2: do not overwrite the console
Date: Sun,  5 Aug 2012 14:31:34 -0300	[thread overview]
Message-ID: <1344187894-30940-2-git-send-email-festevam@gmail.com> (raw)
In-Reply-To: <1344187894-30940-1-git-send-email-festevam@gmail.com>

From: Fabio Estevam <fabio.estevam@freescale.com>

On this board, the console is always set to the serial line.
Do not allow to overwrite it when video is enabled.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 board/ttcontrol/vision2/vision2.c |   11 +++++++++--
 include/configs/vision2.h         |    2 ++
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/board/ttcontrol/vision2/vision2.c b/board/ttcontrol/vision2/vision2.c
index d68bef7..d287544 100644
--- a/board/ttcontrol/vision2/vision2.c
+++ b/board/ttcontrol/vision2/vision2.c
@@ -674,11 +674,18 @@ int board_late_init(void)
 	udelay(2000);
 #endif
 
-	setenv("stdout", "serial");
-
 	return 0;
 }
 
+/*
+ * Do not overwrite the console
+ * Use always serial for U-Boot console
+ */
+int overwrite_console(void)
+{
+	return 1;
+}
+
 int checkboard(void)
 {
 	puts("Board: TTControl Vision II CPU V\n");
diff --git a/include/configs/vision2.h b/include/configs/vision2.h
index 0ed53d2..34fc1cb 100644
--- a/include/configs/vision2.h
+++ b/include/configs/vision2.h
@@ -215,6 +215,8 @@
 #define CONFIG_VIDEO_IPUV3
 #define CONFIG_CFB_CONSOLE
 #define CONFIG_VGA_AS_SINGLE_DEVICE
+#define CONFIG_SYS_CONSOLE_IS_IN_ENV
+#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
 #define CONFIG_VIDEO_BMP_RLE8
 #define CONFIG_SPLASH_SCREEN
 #define CONFIG_CMD_BMP
-- 
1.7.1

  reply	other threads:[~2012-08-05 17:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-05 17:31 [U-Boot] [PATCH 1/2] mx51evk: do not overwrite the console Fabio Estevam
2012-08-05 17:31 ` Fabio Estevam [this message]
2012-08-07  9:35   ` [U-Boot] [PATCH 2/2] vision2: " Stefano Babic
2012-08-06  8:15 ` [U-Boot] [PATCH 1/2] mx51evk: " Stefano Babic
2012-08-06 13:48   ` Fabio Estevam
2012-08-07  9:35 ` Stefano Babic

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=1344187894-30940-2-git-send-email-festevam@gmail.com \
    --to=festevam@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox