summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-02-06 14:31:37 -0700
committerAnatolij Gustschin <agust@denx.de>2016-02-11 21:37:17 +0100
commita2931b30d287b709c09f0a4ee7c1d4c26bee69d5 (patch)
tree8f465b442d616f049d2cf457e34b4a1afcb0ef9c /common
parent1382648b6bef3921086abeadadbd9fbc54619ab1 (diff)
downloadtalos-obmc-uboot-a2931b30d287b709c09f0a4ee7c1d4c26bee69d5.tar.gz
talos-obmc-uboot-a2931b30d287b709c09f0a4ee7c1d4c26bee69d5.zip
dm: video: Add a temporary work-around for old stdout var
Boards with a saved environment may use 'lcd' in their stdout environment variable, expecting that this will enable output to the LCD. When the board moves to use driver model for video, this will no-longer work. Add a work-around to fix this. A warning messages is printed, and we will remove the work-around at the end of 2016. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Tested-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'common')
-rw-r--r--common/console.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/common/console.c b/common/console.c
index b3f5fdc03a..6a0d11bb04 100644
--- a/common/console.c
+++ b/common/console.c
@@ -650,6 +650,10 @@ struct stdio_dev *search_device(int flags, const char *name)
struct stdio_dev *dev;
dev = stdio_get_by_name(name);
+#ifdef CONFIG_VIDCONSOLE_AS_LCD
+ if (!dev && !strcmp(name, "lcd"))
+ dev = stdio_get_by_name("vidconsole");
+#endif
if (dev && (dev->flags & flags))
return dev;
@@ -795,6 +799,10 @@ done:
#ifndef CONFIG_SYS_CONSOLE_INFO_QUIET
stdio_print_current_devices();
#endif /* CONFIG_SYS_CONSOLE_INFO_QUIET */
+#ifdef CONFIG_VIDCONSOLE_AS_LCD
+ if (strstr(stdoutname, "lcd"))
+ printf("Warning: Please change 'lcd' to 'vidconsole' in stdout/stderr environment vars\n");
+#endif
#ifdef CONFIG_SYS_CONSOLE_ENV_OVERWRITE
/* set the environment variables (will overwrite previous env settings) */
OpenPOWER on IntegriCloud