summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Reinauer <reinauer@chromium.org>2012-02-15 10:17:03 -0800
committerGerrit <chrome-bot@google.com>2012-02-15 12:27:44 -0800
commitb3d01c15e9cfe3d28f3947eaded1da5dea02ea57 (patch)
tree68a0d68ebf2a3ca855d06f8f1ec8901f86d47674
parent2a4efc19a347da208c8e909a66fa9b945827170b (diff)
Fix USB keyboard in RW images
USB keyboard initialization was added in twostop_boot as a hack. However, if u-boot is running from one of the RW sections, twostop_boot is never executed, instead the code proceeds to twostop_readwrite_main_firmware() which was lacking the USB keyboard initialization. This patch adds USB keyboard initialization to the RW code path. BUG=chrome-os-partner:7940 TEST=boot from RW section in dev mode, observe that USB keyboard is working. (stumpy) Signed-off-by: Stefan Reinauer <reinauer@google.com> Change-Id: Ie49d14680a72c2216b4a68091ae6e6adcca91242 Reviewed-on: https://gerrit.chromium.org/gerrit/15913 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Commit-Ready: Stefan Reinauer <reinauer@chromium.org> Tested-by: Stefan Reinauer <reinauer@chromium.org>
-rw-r--r--common/cmd_vboot_twostop.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/common/cmd_vboot_twostop.c b/common/cmd_vboot_twostop.c
index 88cc50a9eb..76b3fed4d5 100644
--- a/common/cmd_vboot_twostop.c
+++ b/common/cmd_vboot_twostop.c
@@ -862,7 +862,15 @@ twostop_readwrite_main_firmware(void)
return TWOSTOP_SELECT_ERROR;
}
- /* TODO Now, initialize device that bootstub did not initialize */
+#ifdef CONFIG_USB_KEYBOARD
+ if (board_use_usb_keyboard(FIRMWARE_TYPE_NORMAL)) {
+ int cnt;
+ /* enumerate USB devices to find the keyboard */
+ cnt = usb_init();
+ if (cnt >= 0)
+ drv_usb_kbd_init();
+ }
+#endif
return twostop_main_firmware(&fmap, gbb, cdata, cdata->vb_shared_data);
}