summaryrefslogtreecommitdiffstats
path: root/common/cmd_usb.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-09-08 11:15:11 -0600
committerSimon Glass <sjg@chromium.org>2015-11-19 20:13:39 -0700
commit34ab37eef5a5f8023abc657ab38f7b9fe11c38b3 (patch)
tree3a8917301e9cffb9286c343a04f45316d4d164da /common/cmd_usb.c
parent2b24e09c66480f3723b137f434a6c3b0db764817 (diff)
downloadblackbird-obmc-uboot-34ab37eef5a5f8023abc657ab38f7b9fe11c38b3.tar.gz
blackbird-obmc-uboot-34ab37eef5a5f8023abc657ab38f7b9fe11c38b3.zip
dm: usb: Add support for USB keyboards with driver model
Switch USB keyboards over to use driver model instead of scanning with the horrible usb_get_dev_index() function. This involves creating a new uclass for keyboards, although so far there is no API. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/cmd_usb.c')
-rw-r--r--common/cmd_usb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/common/cmd_usb.c b/common/cmd_usb.c
index 1ef55dcd1c..4679134478 100644
--- a/common/cmd_usb.c
+++ b/common/cmd_usb.c
@@ -527,11 +527,14 @@ static void do_usb_start(void)
/* Driver model will probe the devices as they are found */
#ifndef CONFIG_DM_USB
-#ifdef CONFIG_USB_STORAGE
+# ifdef CONFIG_USB_STORAGE
/* try to recognize storage devices immediately */
usb_stor_curr_dev = usb_stor_scan(1);
-#endif
-#endif
+# endif
+# ifdef CONFIG_USB_KEYBOARD
+ drv_usb_kbd_init();
+# endif
+#endif /* !CONFIG_DM_USB */
#ifdef CONFIG_USB_HOST_ETHER
# ifdef CONFIG_DM_ETH
# ifndef CONFIG_DM_USB
@@ -542,9 +545,6 @@ static void do_usb_start(void)
usb_ether_curr_dev = usb_host_eth_scan(1);
# endif
#endif
-#ifdef CONFIG_USB_KEYBOARD
- drv_usb_kbd_init();
-#endif
}
#ifdef CONFIG_DM_USB
OpenPOWER on IntegriCloud