Patrick Georgi (patrick@georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4649
-gerrit
commit 4a7aa6610e08b3dbac7b5018ec08cd9192be83f6 Author: Patrick Georgi patrick@georgi-clan.de Date: Fri Jan 10 20:40:59 2014 +0100
libpayload: Bring keyboard_wait_write() back
Code is using it...
Change-Id: I6894b45cbbf70c8e7ce37ce18d93cadf0ea9fbfc Signed-off-by: Patrick Georgi patrick@georgi-clan.de --- payloads/libpayload/drivers/keyboard.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/payloads/libpayload/drivers/keyboard.c b/payloads/libpayload/drivers/keyboard.c index 0175bc7..ddedbd3 100644 --- a/payloads/libpayload/drivers/keyboard.c +++ b/payloads/libpayload/drivers/keyboard.c @@ -258,6 +258,16 @@ int keyboard_getchar(void) return ret; }
+static int keyboard_wait_write(void) +{ + int retries = 10000; + + while(retries-- && (inb(0x64) & 0x02)) + udelay(50); + + return (retries <= 0) ? -1 : 0; +} + /** * Set keyboard layout * @param country string describing the keyboard layout language.