[U-Boot] [RESEND PATCH 05/10] board: ge: bx50v3: Fix message output to video console

Robert Beckett bob.beckett at collabora.com
Tue Nov 12 19:15:15 UTC 2019


From: Ian Ray <ian.ray at ge.com>

Use vidconsole for output to the LCD, now that DM_VIDEO is used.  Write
white text on a black background, like before migrating to DM_VIDEO.

Signed-off-by: Ian Ray <ian.ray at ge.com>
Signed-off-by: Robert Beckett <bob.beckett at collabora.com>
---

 board/ge/bx50v3/bx50v3.c    | 21 ++++++++++++++-------
 configs/ge_bx50v3_defconfig |  1 +
 include/configs/ge_bx50v3.h |  9 ++++-----
 3 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/board/ge/bx50v3/bx50v3.c b/board/ge/bx50v3/bx50v3.c
index 747171bf19..988d3b19b5 100644
--- a/board/ge/bx50v3/bx50v3.c
+++ b/board/ge/bx50v3/bx50v3.c
@@ -218,13 +218,6 @@ static void do_enable_hdmi(struct display_info_t const *dev)
 	imx_enable_hdmi_phy();
 }
 
-int board_cfb_skip(void)
-{
-	gpio_direction_output(LVDS_POWER_GP, 1);
-
-	return 0;
-}
-
 static int is_b850v3(void)
 {
 	return confidx == 3;
@@ -712,8 +705,14 @@ int ft_board_setup(void *blob, bd_t *bd)
 
 static int do_backlight_enable(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
+#if CONFIG_IS_ENABLED(DM_VIDEO)
+	int ret;
+	struct udevice *dev;
+
 #ifdef CONFIG_VIDEO_IPUV3
 	if (!is_b850v3()) {
+		gpio_direction_output(LVDS_POWER_GP, 1);
+
 		/* We need at least 200ms between power on and backlight on
 		 * as per specifications from CHI MEI
 		 */
@@ -732,6 +731,14 @@ static int do_backlight_enable(cmd_tbl_t *cmdtp, int flag, int argc, char * cons
 	}
 #endif
 
+	/* Probe, to find a video device to be used to show a message on
+	 * the vidconsole.
+	 */
+	ret = uclass_get_device(UCLASS_VIDEO, 0, &dev);
+	if (ret)
+		return ret;
+#endif
+
 	return 0;
 }
 
diff --git a/configs/ge_bx50v3_defconfig b/configs/ge_bx50v3_defconfig
index bc268367ed..2cf6e77e12 100644
--- a/configs/ge_bx50v3_defconfig
+++ b/configs/ge_bx50v3_defconfig
@@ -68,3 +68,4 @@ CONFIG_WATCHDOG_TIMEOUT_MSECS=6000
 CONFIG_IMX_WATCHDOG=y
 # CONFIG_EFI_LOADER is not set
 CONFIG_SYS_MALLOC_F_LEN=0x4000
+CONFIG_SYS_WHITE_ON_BLACK=y
diff --git a/include/configs/ge_bx50v3.h b/include/configs/ge_bx50v3.h
index 6de5119d7f..92a927bb82 100644
--- a/include/configs/ge_bx50v3.h
+++ b/include/configs/ge_bx50v3.h
@@ -114,12 +114,11 @@
 	"swappartitions=" \
 		"setexpr partnum 3 - ${partnum}\0" \
 	"failbootcmd=" \
+		"echo reached failbootcmd; " \
 		"bx50_backlight_enable; " \
-		"msg=\"Monitor failed to start.  Try again, or contact GE Service for support.\"; " \
-		"echo $msg; " \
-		"setenv stdout vga; " \
-		"echo \"\n\n\n\n    \" $msg; " \
-		"setenv stdout serial; " \
+		"setcurs 5 4; " \
+		"lcdputs \"Monitor failed to start. " \
+		"Try again, or contact GE Service for support.\"; " \
 		"mw.b 0x7000A000 0xbc; " \
 		"mw.b 0x7000A001 0x00; " \
 		"ext4write ${dev} ${devnum}:5 0x7000A000 /boot/failures 2\0" \
-- 
2.20.1



More information about the U-Boot mailing list