summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2011-12-08 01:21:22 +0000
committerGerrit <chrome-bot@google.com>2011-12-08 09:08:24 -0800
commit18cff66c0bca062280d6788d3293570370b78c6f (patch)
treee146ebd5de369a7aa2b0158c808c2ea84825ee64 /common
parentd1782ef04ceff3534ffa71675e1d636cbf682bc5 (diff)
USB: fix USB keyboard selection with iomux
When U-Boot is configured with CONFIG_IOMUX, even if the usbkbd is the highest priority input device (e.g. stdin=="usbkbd,serial"), the console input was not switched to the USB keyboard when enumerating usb devices using "usb start". Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=chrome-os-partner:5752 TEST=on Lumpy, use USB keyboard to enter commands on U-Boot command line. Change-Id: I7d15a7bea9de97a1fad79cf269772878e5dd03c3 Reviewed-on: https://gerrit.chromium.org/gerrit/12603 Tested-by: Vincent Palatin <vpalatin@chromium.org> Commit-Ready: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/usb_kbd.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/common/usb_kbd.c b/common/usb_kbd.c
index 670d953a166..182bb883cc8 100644
--- a/common/usb_kbd.c
+++ b/common/usb_kbd.c
@@ -478,15 +478,19 @@ int drv_usb_kbd_init(void)
if (error)
return error;
- /* Check if this is the standard input device. */
- if (strcmp(stdinname, DEVNAME))
- return 1;
-
/* Reassign the console */
if (overwrite_console())
return 1;
+ /* Check if this is the standard input device. */
+#ifdef CONFIG_CONSOLE_MUX
+ error = iomux_doenv(stdin, stdinname);
+#else
+ if (strcmp(stdinname, DEVNAME))
+ return 1;
+
error = console_assign(stdin, DEVNAME);
+#endif
if (error)
return error;