From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Fri, 15 May 2015 15:06:36 +0200 Subject: [U-Boot] [PATCH 2/5] tbs2910: only enable vga output for stdout/stderr when hdmi detected In-Reply-To: <1430860162-24034-2-git-send-email-smoch@web.de> References: <1430860162-24034-1-git-send-email-smoch@web.de> <1430860162-24034-2-git-send-email-smoch@web.de> Message-ID: <5555EF5C.4030600@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 05/05/2015 23:09, Soeren Moch wrote: > Only enable graphical output for stdout/stderr (and a usb keyboard for stdin) > when a hdmi device is detected. > Serial console is always enabled for stdin/stdout/stderr. > > Signed-off-by: Soeren Moch > --- > Cc: Stefano Babic > --- > include/configs/tbs2910.h | 17 +++++++++++++---- > 1 file changed, 13 insertions(+), 4 deletions(-) > > diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h > index e5828e0..ea4666d 100644 > --- a/include/configs/tbs2910.h > +++ b/include/configs/tbs2910.h > @@ -183,7 +183,13 @@ > #ifdef CONFIG_USB_KEYBOARD > #define CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE > #define CONFIG_SYS_STDIO_DEREGISTER > -#define CONFIG_PREBOOT "if hdmidet; then usb start; fi" > +#define CONFIG_PREBOOT \ > + "if hdmidet; then " \ > + "usb start; " \ > + "run set_con_usb_hdmi; " \ > + "else " \ > + "run set_con_serial; " \ > + "fi;" > #endif /* CONFIG_USB_KEYBOARD */ > #endif /* CONFIG_CMD_USB */ > > @@ -241,9 +247,12 @@ > "bootm 0x10800000 0x10d00000\0" \ > "console=ttymxc0\0" \ > "fan=gpio set 92\0" \ > - "stdin=serial,usbkbd\0" \ > - "stdout=serial,vga\0" \ > - "stderr=serial,vga\0" > + "set_con_serial=setenv stdin serial; " \ > + "setenv stdout serial; " \ > + "setenv stderr serial;\0" \ > + "set_con_usb_hdmi=setenv stdin serial,usbkbd; " \ > + "setenv stdout serial,vga; " \ > + "setenv stderr serial,vga;\0" > > #define CONFIG_BOOTCOMMAND \ > "mmc rescan; " \ > Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk 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 =====================================================================