ectool: add query function to ectool

`ectool -q` - Query the EC IRQ byte.
Should return 0x00 otherwise the IRQ handler is usally broken or disabled.

Tested-on: Lenovo X201t

Change-Id: I0b8c2dbcf38d2eab89d0fbea05795759c4517f6d
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Reviewed-on: http://review.coreboot.org/8382
Tested-by: build bot (Jenkins)
Reviewed-by: Nicolas Reinecke <nr@das-labor.org>
Reviewed-by: Peter Stuge <peter@stuge.se>
This commit is contained in:
Alexander Couzens
2015-02-06 22:27:33 +01:00
committed by Peter Stuge
parent 46ca3a5534
commit 0edf419852
3 changed files with 20 additions and 4 deletions

View File

@@ -147,3 +147,9 @@ uint8_t ec_idx_read(uint16_t addr)
return inb(lpc_idx + 3);
}
uint8_t ec_query(void)
{
send_ec_command(QR_EC);
return recv_ec_data();
}