diff options
author | Nico Huber <nico.huber@secunet.com> | 2017-01-23 13:54:41 +0100 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2017-04-08 13:16:52 +0200 |
commit | 105d8e8b01bd024c3df100b4809684628d3e8f2c (patch) | |
tree | da32b2b1c836d90f25b7782cc6f9948f47a260a4 /src | |
parent | 0ee130a5a23626ecbc37aee7d321a7501ed3c2b3 (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/ec/acpi/ec.c | 5 | ||||
-rw-r--r-- | src/ec/acpi/ec.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/ec/acpi/ec.c b/src/ec/acpi/ec.c index 3f5cd9ed1b..a739b98df3 100644 --- a/src/ec/acpi/ec.c +++ b/src/ec/acpi/ec.c @@ -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); diff --git a/src/ec/acpi/ec.h b/src/ec/acpi/ec.h index 0877fe200b..d9487e9015 100644 --- a/src/ec/acpi/ec.h +++ b/src/ec/acpi/ec.h @@ -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); |