summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2011-12-20 09:58:18 -0800
committerStefan Reinauer <reinauer@chromium.org>2011-12-20 16:52:43 -0800
commita3e0bc8e4e66da7119bf954b1747f70c92e1466b (patch)
tree90554484edcf985d98cce88929ffd18b1dfe706a /lib
parent74e96dbcd1a384f6540d08bec1000ee0e64d59ac (diff)
CHROMIUMOS: fix key stroke detection in recovery mode
When we re-enumerate USB devices to configure new USB mass storage key, we must also properly configure the USB keyboard if there is one connected. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=chrome-os-partner:5752 chrome-os-partner:6344 chromeos-partner:7188 TEST=on Lumpy, insert and remove a USB key in recovery mode and check that TAB still triggers the recovery reason screen. Change-Id: I4bf908023e21c027f6abcb49f168abb3013ed707 Reviewed-on: https://gerrit.chromium.org/gerrit/13251 Reviewed-by: Stefan Reinauer <reinauer@chromium.org> Tested-by: Stefan Reinauer <reinauer@chromium.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/vbexport/boot_device_usb.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/vbexport/boot_device_usb.c b/lib/vbexport/boot_device_usb.c
index e8872e2c4e7..8a384154a4f 100644
--- a/lib/vbexport/boot_device_usb.c
+++ b/lib/vbexport/boot_device_usb.c
@@ -14,6 +14,9 @@
#include "boot_device.h"
#include <vboot_api.h>
+#include <chromeos/crossystem_data.h>
+
+extern int board_use_usb_keyboard(int boot_mode);
static int is_enumerated;
@@ -40,6 +43,10 @@ static int boot_device_usb_start(uint32_t disk_flags)
usb_stop();
if (usb_init() >= 0) {
+#ifdef CONFIG_USB_KEYBOARD
+ if (board_use_usb_keyboard(FIRMWARE_TYPE_RECOVERY))
+ drv_usb_kbd_init();
+#endif
usb_stor_scan(/*mode=*/1);
is_enumerated = 1;
}