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 <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/59959
This commit is contained in:
Randall Spangler
2013-06-25 12:55:35 -07:00
committed by ChromeBot
parent ab6546cbaa
commit 1a00c4eab5
3 changed files with 5 additions and 5 deletions

View File

@@ -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;

View File

@@ -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. */

View File

@@ -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 */