Author: svens Date: Tue Mar 15 10:52:07 2011 New Revision: 6447 URL: https://tracker.coreboot.org/trac/coreboot/changeset/6447
Log: ACPI EC: add ec_query function
Signed-off-by: Sven Schnelle svens@stackframe.org Acked-by: Peter Stuge peter@stuge.se
Modified: trunk/src/ec/acpi/ec.c trunk/src/ec/acpi/ec.h
Modified: trunk/src/ec/acpi/ec.c ============================================================================== --- trunk/src/ec/acpi/ec.c Mon Mar 14 16:23:44 2011 (r6446) +++ trunk/src/ec/acpi/ec.c Tue Mar 15 10:52:07 2011 (r6447) @@ -116,6 +116,12 @@ 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));
Modified: trunk/src/ec/acpi/ec.h ============================================================================== --- trunk/src/ec/acpi/ec.h Mon Mar 14 16:23:44 2011 (r6446) +++ trunk/src/ec/acpi/ec.h Tue Mar 15 10:52:07 2011 (r6447) @@ -42,6 +42,7 @@ 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);