summaryrefslogtreecommitdiff
path: root/common/cbi.c
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2019-04-03 16:32:32 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-04-05 03:53:39 -0700
commit7912ce208ce1356e261ca6e36de87f09ec014b6b (patch)
tree2aaacfa5db41cdea52c461004be9260e16daf308 /common/cbi.c
parente0e48a3187826d03248e35313feb1e8d068439fc (diff)
downloadchrome-ec-7912ce208ce1356e261ca6e36de87f09ec014b6b.tar.gz
cbi: Allow cbi command included optionally
Currently, console command 'cbi' is always included when cbi is enabled. This patch adds CONFIG_CMD_CBI so that a board can choose to include or exclude the command. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=b/129746223,b/127720872 BRANCH=none TEST=buildall Change-Id: I465d9b52af91d54a686022bf19a1c4e698d2a727 Reviewed-on: https://chromium-review.googlesource.com/1552359 Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: YH Lin <yueherngl@chromium.org>
Diffstat (limited to 'common/cbi.c')
-rw-r--r--common/cbi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/cbi.c b/common/cbi.c
index cf4605288a..06e0d464c1 100644
--- a/common/cbi.c
+++ b/common/cbi.c
@@ -347,6 +347,7 @@ DECLARE_HOST_COMMAND(EC_CMD_SET_CROS_BOARD_INFO,
hc_cbi_set,
EC_VER_MASK(0));
+#ifdef CONFIG_CMD_CBI
static void dump_flash(void)
{
uint8_t buf[16];
@@ -398,4 +399,6 @@ static int cc_cbi(int argc, char **argv)
return EC_SUCCESS;
}
DECLARE_CONSOLE_COMMAND(cbi, cc_cbi, NULL, "Print Cros Board Info from flash");
+#endif /* CONFIG_CMD_CBI */
+
#endif /* !HOST_TOOLS_BUILD */