diff --git a/chip/lm4/lpc.c b/chip/lm4/lpc.c index 90a912c6f4..8e2102b403 100644 --- a/chip/lm4/lpc.c +++ b/chip/lm4/lpc.c @@ -67,7 +67,7 @@ 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_PACKET_SIZE] __attribute__((aligned(4))); +static uint8_t params_copy[EC_LPC_HOST_PACKET_SIZE] __attribute__((aligned(4))); static int init_done; static uint8_t * const cmd_params = (uint8_t *)LPC_POOL_CMD_DATA + @@ -513,10 +513,10 @@ static void handle_host_write(int is_cmd) lpc_packet.request_temp = params_copy; lpc_packet.request_max = sizeof(params_copy); /* Don't know the request size so pass in the entire buffer */ - lpc_packet.request_size = EC_HOST_PACKET_SIZE; + lpc_packet.request_size = EC_LPC_HOST_PACKET_SIZE; lpc_packet.response = (void *)LPC_POOL_CMD_DATA; - lpc_packet.response_max = EC_HOST_PACKET_SIZE; + lpc_packet.response_max = EC_LPC_HOST_PACKET_SIZE; lpc_packet.response_size = 0; lpc_packet.driver_result = EC_RES_SUCCESS; diff --git a/include/ec_commands.h b/include/ec_commands.h index f1792af1b1..f853545257 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -47,7 +47,7 @@ #define EC_LPC_ADDR_HOST_PARAM 0x804 #define EC_HOST_PARAM_SIZE 0x0fc /* Size of param area in bytes */ #define EC_LPC_ADDR_HOST_PACKET 0x800 /* Offset of version 3 packet */ -#define EC_HOST_PACKET_SIZE 0x100 /* Max size of version 3 packet */ +#define EC_LPC_HOST_PACKET_SIZE 0x100 /* Max size of version 3 packet */ /* The actual block is 0x800-0x8ff, but some BIOSes think it's 0x880-0x8ff * and they tell the kernel that so we have to think of it as two parts. */ diff --git a/util/comm-lpc.c b/util/comm-lpc.c index c6ddee93c5..3290bc7c7c 100644 --- a/util/comm-lpc.c +++ b/util/comm-lpc.c @@ -138,7 +138,7 @@ static int ec_command_lpc_3(int command, int version, int i; /* Fail if output size is too big */ - if (outsize + sizeof(rq) > EC_HOST_PACKET_SIZE) + if (outsize + sizeof(rq) > EC_LPC_HOST_PACKET_SIZE) return -EC_RES_REQUEST_TRUNCATED; /* Fill in request packet */