libpayload-x86: Add common i8042 driver

Add a common i8042 driver that uses multiple overflowing
fifos to seperate PS/2 port and PS/2 aux port.

Required to support PC keyboard and PC mouse at the same time.

Tested on Lenovo T500.

Change-Id: I4ca803bfa3ed45111776eef1f4dccd3fab02ea39
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/18594
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Patrick Rudolph
2017-03-01 19:07:37 +01:00
committed by Patrick Georgi
parent 2b2f89565e
commit e6a3821b97
4 changed files with 425 additions and 0 deletions

View File

@ -178,6 +178,31 @@ void mouse_cursor_set_acceleration(u8 val);
u8 mouse_cursor_get_acceleration(void);
/** @} */
/**
* @defgroup i8042 controller functions
* @ingroup input
* @{
*/
size_t i8042_has_ps2(void);
size_t i8042_has_aux(void);
u8 i8042_probe(void);
void i8042_close(void);
int i8042_cmd(u8 cmd);
void i8042_write_data(u8 data);
u8 i8042_data_ready_ps2(void);
u8 i8042_data_ready_aux(void);
u8 i8042_read_data_ps2(void);
u8 i8042_read_data_aux(void);
int i8042_wait_read_ps2(void);
int i8042_wait_read_aux(void);
/** @} */
/**
* @defgroup serial Serial functions
* @ingroup input