]> git.sur5r.net Git - u-boot/commitdiff
mx6cuboxi: Skip usb initialization when booting without HDMI
authorFabio Estevam <fabio.estevam@freescale.com>
Mon, 4 May 2015 17:09:23 +0000 (14:09 -0300)
committerStefano Babic <sbabic@denx.de>
Fri, 15 May 2015 17:20:47 +0000 (19:20 +0200)
Starting USB initialization is useful for those who use Cuboxi/Hummingboard
with HDMI and USB keyboard.

However, when booting without a HDMI connection we can skip the usb
initialization, which makes the boot faster.

Signed-off-by: Jon Nettleton <jon.nettleton@gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-By: Vagrant Cascadian <vagrant@aikidev.net>
include/configs/mx6cuboxi.h

index 4e07f59bef9ef8add28eaca207cb1da65ec904a4..b6f9d4e580b75cb957937de1a2256a2ab2257a33 100644 (file)
@@ -80,6 +80,7 @@
 #define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
 #define CONFIG_IMX_HDMI
+#define CONFIG_CMD_HDMIDETECT
 #define CONFIG_IMX_VIDEO_SKIP
 #define CONFIG_CONSOLE_MUX
 
 #define CONFIG_USB_MAX_CONTROLLER_COUNT        2
 #define CONFIG_USB_KEYBOARD
 #define CONFIG_SYS_USB_EVENT_POLL
-#define CONFIG_PREBOOT                 "usb start"
+#define CONFIG_PREBOOT \
+       "if hdmidet; then " \
+               "usb start; "                  \
+               "setenv stdin  serial,usbkbd; "\
+               "setenv stdout serial,vga; "   \
+               "setenv stderr serial,vga; "   \
+       "else " \
+               "setenv stdin  serial; " \
+               "setenv stdout serial; " \
+               "setenv stderr serial; " \
+       "fi;"
 
 #define CONFIG_SYS_NO_FLASH
 
 
 #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
 #define CONFIG_EXTRA_ENV_SETTINGS \
-       "stdin=serial,usbkbd\0" \
-       "stdout=serial,vga\0" \
-       "stderr=serial,vga\0" \
        "script=boot.scr\0" \
        "image=zImage\0" \
        "fdtfile=undefined\0" \