libpayload: Bring keyboard_wait_write() back

Code is using it...

Change-Id: I6894b45cbbf70c8e7ce37ce18d93cadf0ea9fbfc
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/4649
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
Patrick Georgi 2014-01-10 20:40:59 +01:00 committed by Nico Huber
parent 5fb48a85dc
commit fd5b370437
1 changed files with 10 additions and 0 deletions

View File

@ -258,6 +258,16 @@ int keyboard_getchar(void)
return ret; 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 * Set keyboard layout
* @param country string describing the keyboard layout language. * @param country string describing the keyboard layout language.