diff options
author | Shawn Nematbakhsh <shawnn@chromium.org> | 2017-02-22 16:52:04 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-02-25 16:34:15 -0800 |
commit | 6ba124a81bd6d5af1edae5f30add22e81b8b7de7 (patch) | |
tree | 8305113b48e281b41ee4bbf005eb5a07d7e07a3a | |
parent | 9619578ad20a2a4c9ed500e53227fab6158e41d0 (diff) | |
download | chrome-ec-6ba124a81bd6d5af1edae5f30add22e81b8b7de7.tar.gz |
hostcmd: Remove EC_CMD_VBNV_CONTEXT handler for most boards
Most boards do not keep VBNV storage on the EC, so leave out the host
command handler by default.
BUG=chromium:693210
BRANCH=None
TEST=`make buildall -j`
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Change-Id: Ia202ec7d73d1804d8430fe7516cc783afd86e89a
Reviewed-on: https://chromium-review.googlesource.com/446716
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
-rw-r--r-- | board/big/board.h | 1 | ||||
-rw-r--r-- | board/jerry/board.h | 1 | ||||
-rw-r--r-- | board/pit/board.h | 1 | ||||
-rw-r--r-- | common/system.c | 10 | ||||
-rw-r--r-- | include/config.h | 5 | ||||
-rw-r--r-- | include/system.h | 4 |
6 files changed, 10 insertions, 12 deletions
diff --git a/board/big/board.h b/board/big/board.h index 04d4220c5e..1cef71bb49 100644 --- a/board/big/board.h +++ b/board/big/board.h @@ -19,6 +19,7 @@ #define CONFIG_POWER_COMMON #define CONFIG_EXTPOWER_GPIO #define CONFIG_HOST_COMMAND_STATUS +#define CONFIG_HOSTCMD_VBNV_CONTEXT #define CONFIG_I2C #define CONFIG_I2C_MASTER #define CONFIG_KEYBOARD_PROTOCOL_MKBP diff --git a/board/jerry/board.h b/board/jerry/board.h index e5c263b432..334d27bd28 100644 --- a/board/jerry/board.h +++ b/board/jerry/board.h @@ -25,6 +25,7 @@ #define CONFIG_EXTPOWER_GPIO #define CONFIG_FORCE_CONSOLE_RESUME #define CONFIG_HOST_COMMAND_STATUS +#define CONFIG_HOSTCMD_VBNV_CONTEXT #define CONFIG_I2C #define CONFIG_I2C_MASTER #define CONFIG_I2C_VIRTUAL_BATTERY diff --git a/board/pit/board.h b/board/pit/board.h index 0dc766a506..9bd4af3585 100644 --- a/board/pit/board.h +++ b/board/pit/board.h @@ -16,6 +16,7 @@ #define CONFIG_CMD_PMU #define CONFIG_EXTPOWER_GPIO #define CONFIG_HOST_COMMAND_STATUS +#define CONFIG_HOSTCMD_VBNV_CONTEXT #define CONFIG_I2C #define CONFIG_I2C_MASTER #define CONFIG_KEYBOARD_BOARD_CONFIG diff --git a/common/system.c b/common/system.c index a5824f0a72..8608a9913c 100644 --- a/common/system.c +++ b/common/system.c @@ -1223,6 +1223,7 @@ DECLARE_HOST_COMMAND(EC_CMD_GET_BOARD_VERSION, EC_VER_MASK(0)); #endif +#ifdef CONFIG_HOSTCMD_VBNV_CONTEXT int host_command_vbnvcontext(struct host_cmd_handler_args *args) { const struct ec_params_vbnvcontext *p = args->params; @@ -1250,15 +1251,10 @@ int host_command_vbnvcontext(struct host_cmd_handler_args *args) return EC_RES_SUCCESS; } - -/* - * TODO(crbug.com/239197) : Adding both versions to the version mask is a - * temporary workaround for a problem in the cros_ec driver. Drop - * EC_VER_MASK(0) once cros_ec driver can send the correct version. - */ DECLARE_HOST_COMMAND(EC_CMD_VBNV_CONTEXT, host_command_vbnvcontext, - EC_VER_MASK(EC_VER_VBNV_CONTEXT) | EC_VER_MASK(0)); + EC_VER_MASK(EC_VER_VBNV_CONTEXT)); +#endif /* CONFIG_HOSTCMD_VBNV_CONTEXT */ int host_command_reboot(struct host_cmd_handler_args *args) { diff --git a/include/config.h b/include/config.h index 29625d201d..d9597d01cd 100644 --- a/include/config.h +++ b/include/config.h @@ -1328,9 +1328,12 @@ /* Panic when status of PD MCU reflects that it has crashed */ #undef CONFIG_HOSTCMD_PD_PANIC -/* Board supports RTC host commands*/ +/* Board supports RTC host commands */ #undef CONFIG_HOSTCMD_RTC +/* For access to VBNV on-EC battery-backed storage */ +#undef CONFIG_HOSTCMD_VBNV_CONTEXT + /*****************************************************************************/ /* Enable debugging and profiling statistics for hook functions */ diff --git a/include/system.h b/include/system.h index 12b40e09ab..b584e3586e 100644 --- a/include/system.h +++ b/include/system.h @@ -273,10 +273,6 @@ const char *system_get_chip_revision(void); * not implemented. */ enum system_bbram_idx { - /* - * TODO(crbug.com/693210): Consider boards without vbnvcontext - * host command. - */ SYSTEM_BBRAM_IDX_VBNVBLOCK0 = 0, /* * ... |