[U-Boot] [PATCH] USB: reevaluate iomux stdin on USB kbd detect

Allen Martin amartin at nvidia.com
Fri Dec 23 21:29:48 CET 2011


If CONSOLE_MUX is enabled, reevaluate console stdin when USB keyboard
device is detected.

Signed-off-by: Allen Martin <amartin at nvidia.com>
---
 common/usb_kbd.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/common/usb_kbd.c b/common/usb_kbd.c
index e94bb7e..577a1eb 100644
--- a/common/usb_kbd.c
+++ b/common/usb_kbd.c
@@ -493,6 +493,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;
@@ -504,6 +509,7 @@ int drv_usb_kbd_init(void)
 		error = console_assign(stdin, DEVNAME);
 		if (error)
 			return error;
+#endif
 
 		return 1;
 	}
-- 
1.7.5.4



More information about the U-Boot mailing list