<meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">I know this is off topic, but how did you get corebios flashed to the T60?  Is there a software based way or must I get hardware in order to do it?</span><br>

<br><div class="gmail_quote">On Sat, May 28, 2011 at 7:23 AM, Sven Schnelle <span dir="ltr"><<a href="mailto:svens@stackframe.org">svens@stackframe.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi Kevin,<br>
<br>
Kevin O'Connor <<a href="mailto:kevin@koconnor.net">kevin@koconnor.net</a>> writes:<br>
<br>
> On Sat, May 07, 2011 at 08:48:45PM +0200, Sven Schnelle wrote:<br>
>> Kevin O'Connor <<a href="mailto:kevin@koconnor.net">kevin@koconnor.net</a>> writes:<br>
>> > Some ps2 ports send NAK (0xfe) when there is no keyboard plugged in.<br>
>> > The detection for NAK was added so that it doesn't take a full second<br>
>> > to recognize that no keyboard is present.  The patch you sent would<br>
>> > loop infinitely in this situation.<br>
>><br>
>> Yes, the patch was only for testing purposes. :)<br>
>><br>
>> I feared that are controllers out there that behave like this, so i have<br>
>> to find another solution.<br>
><br>
> How about something like (untested):<br>
><br>
> --- a/src/ps2port.c<br>
> +++ b/src/ps2port.c<br>
> @@ -438,9 +438,14 @@ keyboard_init(void *data)<br>
><br>
>      /* ------------------- keyboard side ------------------------*/<br>
>      /* reset keyboard and self test  (keyboard side) */<br>
> -    ret = ps2_kbd_command(ATKBD_CMD_RESET_BAT, param);<br>
> -    if (ret)<br>
> -        return;<br>
> +    u64 end = calc_future_tsc(4000);<br>
> +    for (;;) {<br>
> +        ret = ps2_kbd_command(ATKBD_CMD_RESET_BAT, param);<br>
> +        if (!ret)<br>
> +            break;<br>
> +        if (check_tsc(end))<br>
> +            return;<br>
> +    }<br>
>      if (param[0] != 0xaa) {<br>
>          dprintf(1, "keyboard self test failed (got %x not 0xaa)\n", param[0]);<br>
>          return;<br>
><br>
> If it works, the 4000 could be turned into a config option.<br>
<br>
Yes, that fixes it. I'm using the patch below right now.<br>
<br>
Not sure about the default value, but 0 seems to be safe to not<br>
introduce an additional delay for other users ;)<br>
<br>
Signed-off-by: Sven Schnelle <<a href="mailto:svens@stackframe.org">svens@stackframe.org</a>><br>
<br>
diff --git a/src/Kconfig b/src/Kconfig<br>
index 123db01..21cef19 100644<br>
--- a/src/Kconfig<br>
+++ b/src/Kconfig<br>
@@ -126,6 +126,14 @@ menu "Hardware support"<br>
         help<br>
             Support PS2 ports (keyboard and mouse).<br>
<br>
+    config PS2_RESET_TIMEOUT<br>
+        depends on PS2PORT<br>
+        int "Reset timeout (in ms)"<br>
+        default 0<br>
+        help<br>
+            This option specifies how long we should wait for the Keyboard.<br>
+            Some keyboards are requiring a delay after POR for initialization.<br>
+<br>
     config USB<br>
         bool "USB"<br>
         default y<br>
diff --git a/src/ps2port.c b/src/ps2port.c<br>
index 81d47c9..3df8a8a 100644<br>
--- a/src/ps2port.c<br>
+++ b/src/ps2port.c<br>
@@ -438,7 +438,9 @@ keyboard_init(void *data)<br>
<br>
     /* ------------------- keyboard side ------------------------*/<br>
     /* reset keyboard and self test  (keyboard side) */<br>
-    ret = ps2_kbd_command(ATKBD_CMD_RESET_BAT, param);<br>
+    u64 end = calc_future_tsc(CONFIG_PS2_RESET_TIMEOUT);<br>
+    while ((ret = ps2_kbd_command(ATKBD_CMD_RESET_BAT, param)) && !check_tsc(end));<br>
+<br>
     if (ret)<br>
         return;<br>
     if (param[0] != 0xaa) {<br>
<font color="#888888"><br>
--<br>
coreboot mailing list: <a href="mailto:coreboot@coreboot.org">coreboot@coreboot.org</a><br>
<a href="http://www.coreboot.org/mailman/listinfo/coreboot" target="_blank">http://www.coreboot.org/mailman/listinfo/coreboot</a><br>
</font></blockquote></div><br>