From 1a00c4eab591f420a2e350e42e9047b2934451f0 Mon Sep 17 00:00:00 2001 From: Randall Spangler Date: Tue, 25 Jun 2013 12:55:35 -0700 Subject: Rename LPC packet size constant for version 3 protocol The maximum packet length for LPC is limited by the I/O space window size. But that's not the case for SPI or LPC. Rename LPC constant before adding a SPI constant. BUG=chrome-os-partner:20257 BRANCH=none TEST=build link Change-Id: I088327a11eff18d401c773db953700a36f9c1bb4 Signed-off-by: Randall Spangler Reviewed-on: https://gerrit.chromium.org/gerrit/59959 --- chip/lm4/lpc.c | 6 +++--- include/ec_commands.h | 2 +- util/comm-lpc.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) 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 */ -- cgit v1.2.1