]> git.sur5r.net Git - u-boot/commitdiff
USB: reevaluate iomux stdin on USB kbd detect
authoramartin@nvidia.com <amartin@nvidia.com>
Fri, 23 Dec 2011 10:29:48 +0000 (10:29 +0000)
committerWolfgang Denk <wd@denx.de>
Sat, 3 Mar 2012 15:56:22 +0000 (16:56 +0100)
If CONSOLE_MUX is enabled, reevaluate console stdin when USB keyboard
device is detected.

Signed-off-by: Allen Martin <amartin@nvidia.com>
common/usb_kbd.c

index 2472d25d4a9bc33b3f9e21724000eaaf0549c71e..960a70a43d158465820e1ffe13e32386eca4767a 100644 (file)
@@ -487,6 +487,11 @@ int drv_usb_kbd_init(void)
                if (error)
                        return error;
 
+#ifdef CONFIG_CONSOLE_MUX
+               error = iomux_doenv(stdin, stdinname);
+               if (error)
+                       return error;
+#else
                /* Check if this is the standard input device. */
                if (strcmp(stdinname, DEVNAME))
                        return 1;
@@ -498,6 +503,7 @@ int drv_usb_kbd_init(void)
                error = console_assign(stdin, DEVNAME);
                if (error)
                        return error;
+#endif
 
                return 1;
        }