diff options
author | Randall Spangler <rspangler@chromium.org> | 2013-06-13 20:26:30 -0700 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-06-14 16:16:22 -0700 |
commit | 981208dbcf31067ba85519ec9e8ec22d19ceed4d (patch) | |
tree | b089c1f93a9960a5c8582bf5f15b86644dee0caf /chip/lm4 | |
parent | 1bd57bba3811118f9dce69017ba18914ede15ac0 (diff) | |
download | chrome-ec-981208dbcf31067ba85519ec9e8ec22d19ceed4d.tar.gz |
Move lpc-specific flags out of host command args
The flags are specific to the LPC interface and not used by the host
command module, so shouldn't be present at that level.
BUG=chrome-os-partner:20185
BRANCH=none
TEST='ectool hello' still works
Change-Id: I6b2c3208fc398ea40d9e7cc7bf5ec206b3e317d8
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/58631
Reviewed-by: Vic Yang <victoryang@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'chip/lm4')
-rw-r--r-- | chip/lm4/lpc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/chip/lm4/lpc.c b/chip/lm4/lpc.c index 005853a71a..b01bee60d5 100644 --- a/chip/lm4/lpc.c +++ b/chip/lm4/lpc.c @@ -63,6 +63,7 @@ static uint8_t acpi_mem_test; /* Test byte in ACPI memory space */ static uint32_t host_events; /* Currently pending SCI/SMI events */ static uint32_t event_mask[3]; /* Event masks for each type */ static struct host_cmd_handler_args host_cmd_args; +static uint8_t host_cmd_flags; /* Flags from host command */ /* Params must be 32-bit aligned */ static uint8_t params_copy[EC_HOST_PARAM_SIZE] __attribute__((aligned(4))); @@ -185,7 +186,7 @@ static void lpc_send_response(struct host_cmd_handler_args *args) /* New-style response */ lpc_host_args->flags = - (args->flags & ~EC_HOST_ARGS_FLAG_FROM_HOST) | + (host_cmd_flags & ~EC_HOST_ARGS_FLAG_FROM_HOST) | EC_HOST_ARGS_FLAG_TO_HOST; lpc_host_args->data_size = size; @@ -479,10 +480,10 @@ static void handle_host_write(int is_cmd) host_cmd_args.result = EC_RES_SUCCESS; host_cmd_args.send_response = lpc_send_response; - host_cmd_args.flags = lpc_host_args->flags; + host_cmd_flags = lpc_host_args->flags; /* See if we have an old or new style command */ - if (host_cmd_args.flags & EC_HOST_ARGS_FLAG_FROM_HOST) { + if (host_cmd_flags & EC_HOST_ARGS_FLAG_FROM_HOST) { /* New style command */ int size = lpc_host_args->data_size; int csum, i; @@ -508,7 +509,7 @@ static void handle_host_write(int is_cmd) * checksum is verified. */ csum = host_cmd_args.command + - host_cmd_args.flags + + host_cmd_flags + host_cmd_args.version + host_cmd_args.params_size; |