Replace CONFIG_PS2_KEYBOARD_SPINUP with "etc/ps2-keyboard-spinup" file.
authorKevin O'Connor <kevin@koconnor.net>
Wed, 6 Jul 2011 00:44:00 +0000 (20:44 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Wed, 6 Jul 2011 00:44:00 +0000 (20:44 -0400)
src/Kconfig
src/ps2port.c

index e732528fb5db8239928959d4f0f40ffb38a94baf..7a4d50a2c7d41946a1f9336fafb9091f49d56c72 100644 (file)
@@ -126,14 +126,6 @@ menu "Hardware support"
         default y
         help
             Support PS2 ports (keyboard and mouse).
-    config PS2_KEYBOARD_SPINUP
-        depends on PS2PORT && COREBOOT
-        int "Extra time (in ms) to allow a keyboard to initialize"
-        default 0
-        help
-            Some PS2 keyboards don't respond to commands immediately
-            after powering on.  Specify a positive value here to allow
-            additional time for the keyboard to become responsive.
 
     config USB
         bool "USB"
index 8259f659a14211b490dd3ef417725ea88b8d04a0..58335af913852b7893ec6f4fad1c743531aabdf4 100644 (file)
@@ -7,6 +7,7 @@
 
 #include "ioport.h" // inb
 #include "util.h" // dprintf
+#include "paravirt.h" // romfile_loadint
 #include "biosvar.h" // GET_EBDA
 #include "ps2port.h" // ps2_kbd_command
 #include "pic.h" // eoi_pic1
@@ -438,13 +439,14 @@ keyboard_init(void *data)
 
     /* ------------------- keyboard side ------------------------*/
     /* reset keyboard and self test  (keyboard side) */
-    u64 end = calc_future_tsc(CONFIG_PS2_KEYBOARD_SPINUP);
+    int spinupdelay = romfile_loadint("etc/ps2-keyboard-spinup", 0);
+    u64 end = calc_future_tsc(spinupdelay);
     for (;;) {
         ret = ps2_kbd_command(ATKBD_CMD_RESET_BAT, param);
         if (!ret)
             break;
         if (check_tsc(end)) {
-            if (CONFIG_PS2_KEYBOARD_SPINUP)
+            if (spinupdelay)
                 warn_timeout();
             return;
         }