summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSven Schnelle <svens@stackframe.org>2011-03-15 09:52:07 +0000
committerSven Schnelle <svens@stackframe.org>2011-03-15 09:52:07 +0000
commitf9a0b927f5dceeba7bb1d1fff94569343da98835 (patch)
treee318c5d0113bbc91a096df65324055137f334b93 /src
parent07ca1c47b20e968ff4dce64192f0b10adeb0c488 (diff)
downloadcoreboot-f9a0b927f5dceeba7bb1d1fff94569343da98835.tar.xz
ACPI EC: add ec_query function
Signed-off-by: Sven Schnelle <svens@stackframe.org> Acked-by: Peter Stuge <peter@stuge.se> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6447 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src')
-rw-r--r--src/ec/acpi/ec.c6
-rw-r--r--src/ec/acpi/ec.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/ec/acpi/ec.c b/src/ec/acpi/ec.c
index 1d4ffb8258..2680aa34e4 100644
--- a/src/ec/acpi/ec.c
+++ b/src/ec/acpi/ec.c
@@ -116,6 +116,12 @@ int ec_write(u8 addr, u8 data)
return send_ec_data(data);
}
+u8 ec_query(void)
+{
+ send_ec_command(0x84);
+ return recv_ec_data();
+}
+
void ec_set_bit(u8 addr, u8 bit)
{
ec_write(addr, ec_read(addr) | (1 << bit));
diff --git a/src/ec/acpi/ec.h b/src/ec/acpi/ec.h
index b5a1197e76..8fc88d25fa 100644
--- a/src/ec/acpi/ec.h
+++ b/src/ec/acpi/ec.h
@@ -42,6 +42,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_query(void);
u8 ec_read(u8 addr);
int ec_write(u8 addr, u8 data);
void ec_set_bit(u8 addr, u8 bit);