ec/google/chromeec: Use MAYBE_STATIC

Change-Id: I4c6238b0e5f41fcc667baf6b486c7fff4c90a7cb
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/34944
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Kyösti Mälkki 2019-08-17 19:05:29 +03:00
parent 9c5a9bba8e
commit b93f86601c
1 changed files with 2 additions and 16 deletions

View File

@ -399,24 +399,9 @@ void google_chromeec_ioport_range(uint16_t *out_base, size_t *out_size)
*out_size = size;
}
#ifdef __PRE_RAM__
int google_chromeec_command(struct chromeec_command *cec_command)
{
switch (google_chromeec_command_version()) {
case EC_HOST_CMD_FLAG_VERSION_3:
return google_chromeec_command_v3(cec_command);
case EC_HOST_CMD_FLAG_LPC_ARGS_SUPPORTED:
return google_chromeec_command_v1(cec_command);
}
return -1;
}
#else /* !__PRE_RAM__ */
int google_chromeec_command(struct chromeec_command *cec_command)
{
static int command_version = 0;
MAYBE_STATIC int command_version = 0;
if (command_version <= 0)
command_version = google_chromeec_command_version();
@ -430,6 +415,7 @@ int google_chromeec_command(struct chromeec_command *cec_command)
return -1;
}
#ifndef __PRE_RAM__
#ifndef __SMM__
static void lpc_ec_init(struct device *dev)
{