summaryrefslogtreecommitdiff
path: root/common/memory_commands.c
diff options
context:
space:
mode:
authorShawn Nematbakhsh <shawnn@chromium.org>2016-04-01 12:25:52 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-04-03 10:27:36 -0700
commit257dab7491ba39da5316f53cd34819c8ad937e77 (patch)
tree679c45e5396f0d4f86aa026160e769b927e42743 /common/memory_commands.c
parent93be0c3b0ac3ed49d7d1d99c5ace8cd0487de7f5 (diff)
downloadchrome-ec-257dab7491ba39da5316f53cd34819c8ad937e77.tar.gz
console: Put additional console commands behind CONFIGs
Allow boards to save flash space by undef'ing CONFIGs which gate 'hcdebug' and 'md' console commands. BUG=chrome-os-partner:34489 BRANCH=None TEST=`make buildall -j` Change-Id: I583b98ff1e4d9d6a26958c6895fb0c0305dddceb Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/336813 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'common/memory_commands.c')
-rw-r--r--common/memory_commands.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/memory_commands.c b/common/memory_commands.c
index db22f330c8..da88c71a63 100644
--- a/common/memory_commands.c
+++ b/common/memory_commands.c
@@ -18,6 +18,7 @@ enum format {
FMT_STRING,
};
+#ifdef CONFIG_CMD_MD
static void show_val(uint32_t address, uint32_t index, enum format fmt)
{
uint32_t val;
@@ -55,7 +56,6 @@ static void show_val(uint32_t address, uint32_t index, enum format fmt)
cflush();
}
-
static int command_mem_dump(int argc, char **argv)
{
uint32_t address, i, num = 1;
@@ -110,6 +110,7 @@ DECLARE_CONSOLE_COMMAND(md, command_mem_dump,
"[.b|.h|.s] addr [count]",
"dump memory values, optionally specifying the format",
NULL);
+#endif /* CONFIG_CMD_MD */
static int command_read_word(int argc, char **argv)
{