summaryrefslogtreecommitdiff
path: root/common/host_command.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-07-10 16:30:52 -0700
committerGerrit <chrome-bot@google.com>2012-07-10 21:52:07 -0700
commitf2400b869e9ffeeb1fd4e5a1def584ccc64e7313 (patch)
tree33e9e5976155268f878151df012c3268f373f315 /common/host_command.c
parent2daf748e0e2dad0a3a21e09352d04fe0b12b895b (diff)
downloadchrome-ec-f2400b869e9ffeeb1fd4e5a1def584ccc64e7313.tar.gz
Move ACPI query-event handling to LPC interrupt
And only support it for port 62/66. Also remove 'ectool queryec', because it can't touch port 62/66 once the kernel/ACPI owns it, and query-event isn't supported on the user command port. BUG=chrome-os-partner:11240 TEST=boot system and check EC console output; should see event clears between host commands 0x23, 0x8e, but no hostcmd 0x84. [0.396780 LPC RESET# deasserted] [0.486953 Port 80: 0x29] [0.487415 hostcmd1 0x23] [0.764407 Port 80: 0x88] [0.764579 event clear 0x00000008 -> 00002080] [0.764928 event clear 0x00000080 -> 00002000] [0.765224 event clear 0x00002000 -> 00000000] [0.765578 hostcmd1 0x8e] [0.765868 hostcmd1 0x06] Change-Id: I8ed161dbccd396d685ddf6829a27dfef87d919fb Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/27095 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'common/host_command.c')
-rw-r--r--common/host_command.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/common/host_command.c b/common/host_command.c
index 89752d9321..7dc423cce4 100644
--- a/common/host_command.c
+++ b/common/host_command.c
@@ -132,29 +132,6 @@ static int host_command_read_memmap(uint8_t *data, int *resp_size)
DECLARE_HOST_COMMAND(EC_CMD_READ_MEMMAP, host_command_read_memmap);
#endif
-#ifdef CONFIG_LPC
-/* ACPI query event handler. Note that the returned value is NOT actually
- * an EC_RES enum; it's 0 if no event was pending, or the 1-based
- * index of the lowest bit which was set. */
-static int host_command_acpi_query_event(uint8_t *data, int *resp_size)
-{
- uint32_t events = lpc_get_host_events();
- int i;
-
- for (i = 0; i < 32; i++) {
- if (events & (1 << i)) {
- lpc_clear_host_events(1 << i);
- return i + 1;
- }
- }
-
- /* No events pending */
- return 0;
-}
-DECLARE_HOST_COMMAND(EC_CMD_ACPI_QUERY_EVENT, host_command_acpi_query_event);
-#endif /* CONFIG_LPC */
-
-
/* Finds a command by command number. Returns the command structure, or NULL if
* no match found. */
static const struct host_command *find_host_command(int command)