diff options
author | Simon Glass <sjg@chromium.org> | 2012-08-15 14:16:22 -0700 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-08-16 12:44:03 -0700 |
commit | 8c44bd4932a22e6e7d49a29028bcd0e62f13ddc5 (patch) | |
tree | 149d5f9a467f644fc783b9f97c4ecb351e85e472 | |
parent | 0ecfe96c7e6473bbf40f868f014e5aaec96e81d7 (diff) | |
download | chrome-ec-8c44bd4932a22e6e7d49a29028bcd0e62f13ddc5.tar.gz |
Add new EC_RES_IN_PROGRESS result code
Some commands take a long time. For interfaces which are not synchronous the
host wants an immediate response to know that the command is in progress.
Provide this new result code, and set LPC to ignore it.
BUG=chrome-os-partner:12685
BRANCH=snow,link
TEST=manual
build and boot to kernel on snow
Change-Id: If801c21e6cf96746858dfa64f6ce1f1631d3e6e5
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30469
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
-rw-r--r-- | chip/lm4/lpc.c | 4 | ||||
-rw-r--r-- | include/ec_commands.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/chip/lm4/lpc.c b/chip/lm4/lpc.c index 41da2ab8b8..c098a5f571 100644 --- a/chip/lm4/lpc.c +++ b/chip/lm4/lpc.c @@ -133,6 +133,10 @@ static void lpc_send_response(struct host_cmd_handler_args *args) int size = args->response_size; int max_size; + /* Ignore in-progress on LPC since interface is synchronous anyway */ + if (args->result == EC_RES_IN_PROGRESS) + return; + /* Handle negative size */ if (size < 0) { args->result = EC_RES_INVALID_RESPONSE; diff --git a/include/ec_commands.h b/include/ec_commands.h index c1b19bcf1a..66c5a1d04f 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -186,6 +186,7 @@ enum ec_status { EC_RES_INVALID_RESPONSE = 5, EC_RES_INVALID_VERSION = 6, EC_RES_INVALID_CHECKSUM = 7, + EC_RES_IN_PROGRESS = 8, /* Accepted, command in progress */ }; /* |