mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-29 18:11:05 +00:00
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>
This commit is contained in:
committed by
ChromeBot
parent
1bd57bba38
commit
981208dbcf
@@ -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;
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user