Skip to contentSkip to conversation

mx51evk: do not overwrite the console

PATCH New Fabio Estevam 2 participants 6 messages Aug 5, 2012 – Aug 7, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 mx51evk: do not overwrite the console

From: Fabio Estevam <[email protected]>

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

---
 board/freescale/mx51evk/mx51evk.c |   10 +++++++++-
 include/configs/mx51evk.h         |    2 ++
 2 files changed, 11 insertions(+), 1 deletions(-)
board/freescale/mx51evk/mx51evk.c +9 -1
index 514a7ac..97c8a2c 100644
@@ -536,12 +536,20 @@ int board_late_init(void)
 	setup_iomux_spi();
 	power_init();
 #endif
-	setenv("stdout", "serial");
 
 	return 0;
 }
 #endif
 
+/*
+ * Do not overwrite the console
+ * Use always serial for U-Boot console
+ */
+int overwrite_console(void)
+{
+	return 1;
+}
+
 int checkboard(void)
 {
 	puts("Board: MX51EVK\n");
include/configs/mx51evk.h +2 -0
index 6af5ed7..635678a 100644
@@ -129,6 +129,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_BMP_16BPP
Signature · 1 line
1.7.1
#1 lore raw

PATCH 2/2 vision2: do not overwrite the console

From: Fabio Estevam <[email protected]>

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

---
 board/ttcontrol/vision2/vision2.c |   11 +++++++++--
 include/configs/vision2.h         |    2 ++
 2 files changed, 11 insertions(+), 2 deletions(-)
board/ttcontrol/vision2/vision2.c +9 -2
index d68bef7..d287544 100644
@@ -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");
include/configs/vision2.h +2 -0
index 0ed53d2..34fc1cb 100644
@@ -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
Signature · 1 line
1.7.1
#2 lore raw

PATCH 2/2 vision2: do not overwrite the console

Quoted 7 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

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

---

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#3 lore raw

PATCH 1/2 mx51evk: do not overwrite the console

In reply to Fabio Estevam
Quoted 7 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

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

---

Hi Fabio,

it seems you agree with my patch from yesterday - I will apply all three patches soon !

Regards,
Stefano

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#4 lore raw

PATCH 1/2 mx51evk: do not overwrite the console

Quoted 4 lines · Stefano Babic

Hi Fabio,

it seems you agree with my patch from yesterday - I will apply all three patches soon !

Yes, your solution is very good.

Thanks,

Fabio Estevam

#5 lore raw

PATCH 1/2 mx51evk: do not overwrite the console

In reply to Fabio Estevam
Quoted 7 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

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

---

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================