summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-06-13 20:26:30 -0700
committerChromeBot <chrome-bot@google.com>2013-06-14 16:16:22 -0700
commit981208dbcf31067ba85519ec9e8ec22d19ceed4d (patch)
treeb089c1f93a9960a5c8582bf5f15b86644dee0caf
parent1bd57bba3811118f9dce69017ba18914ede15ac0 (diff)
downloadchrome-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>
-rw-r--r--chip/lm4/lpc.c9
-rw-r--r--include/host_command.h1
2 files changed, 5 insertions, 5 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;
diff --git a/include/host_command.h b/include/host_command.h
index 91ea579ef6..9681be7b1a 100644
--- a/include/host_command.h
+++ b/include/host_command.h
@@ -21,7 +21,6 @@ struct host_cmd_handler_args {
void (*send_response)(struct host_cmd_handler_args *args);
uint8_t command; /* Command (e.g., EC_CMD_FLASH_GET_INFO) */
uint8_t version; /* Version of command (0-31) */
- uint8_t flags; /* Flags (EC_HOST_ARGS_FLAG_*) */
uint8_t params_size; /* Size of input parameters in bytes */
uint8_t i2c_old_response; /* (for I2C) send an old-style response */
const void *params; /* Input parameters */