ec/acpi: Add function to read EC status register

Change-Id: I7b690d1f23ecf4083952c173be1d3a1246bc1593
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/18706
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
Nico Huber 2017-01-23 13:54:41 +01:00 committed by Nico Huber
parent 0ee130a5a2
commit 105d8e8b01
2 changed files with 6 additions and 0 deletions

View File

@ -126,6 +126,11 @@ int ec_write(u8 addr, u8 data)
return send_ec_data(data);
}
u8 ec_status(void)
{
return inb(ec_cmd_reg);
}
u8 ec_query(void)
{
send_ec_command(0x84);

View File

@ -40,6 +40,7 @@ int send_ec_command(u8 command);
int send_ec_data(u8 data);
int send_ec_data_nowait(u8 data);
u8 recv_ec_data(void);
u8 ec_status(void);
u8 ec_query(void);
u8 ec_read(u8 addr);
int ec_write(u8 addr, u8 data);