summaryrefslogtreecommitdiff
path: root/src/ec
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2019-08-17 19:05:29 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2019-08-19 00:04:55 +0000
commitb93f86601cdc1de4adb18620967f49255af52a29 (patch)
treed19e2d3c0d61080d5940d20206aff235633fabf1 /src/ec
parent9c5a9bba8e58e2af4af7e36ae22d00a11cfd532d (diff)
downloadcoreboot-b93f86601cdc1de4adb18620967f49255af52a29.tar.xz
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>
Diffstat (limited to 'src/ec')
-rw-r--r--src/ec/google/chromeec/ec_lpc.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/ec/google/chromeec/ec_lpc.c b/src/ec/google/chromeec/ec_lpc.c
index b7d183ebb0..7dae6a2e17 100644
--- a/src/ec/google/chromeec/ec_lpc.c
+++ b/src/ec/google/chromeec/ec_lpc.c
@@ -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)
{