summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@chromium.org>2018-05-23 14:19:19 +0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2018-06-01 06:22:03 +0000
commit85e0e2105a8bd4c5a29ac3b563774ec483009998 (patch)
tree4c9cbda201beeaef06b57fb21acb146e1b59b405
parentaeebebeb5d1e4723392319dd35bc4a6c4415e6a2 (diff)
downloadchrome-ec-85e0e2105a8bd4c5a29ac3b563774ec483009998.tar.gz
timer: Allow disabling gettime console command
hammer does not need that command, let's just remove it. BRANCH=poppy BUG=b:35647963 TEST=make newsizes, saves 112 bytes of flash Change-Id: I24ed979f8a9053128d4eb56fc5af00429f7ba0ae Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1070950 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1080579
-rw-r--r--common/timer.c2
-rw-r--r--include/config.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/common/timer.c b/common/timer.c
index d88a34164e..117cea4b71 100644
--- a/common/timer.c
+++ b/common/timer.c
@@ -319,6 +319,7 @@ DECLARE_CONSOLE_COMMAND(forcetime, command_force_time,
"Force current time");
#endif
+#ifdef CONFIG_CMD_GETTIME
static int command_get_time(int argc, char **argv)
{
timestamp_t ts = get_time();
@@ -329,6 +330,7 @@ static int command_get_time(int argc, char **argv)
DECLARE_SAFE_CONSOLE_COMMAND(gettime, command_get_time,
NULL,
"Print current time");
+#endif
#ifdef CONFIG_CMD_TIMERINFO
int command_timer_info(int argc, char **argv)
diff --git a/include/config.h b/include/config.h
index 3c5a536453..6c39c0fab8 100644
--- a/include/config.h
+++ b/include/config.h
@@ -807,6 +807,7 @@
#define CONFIG_CMD_FLASHINFO
#undef CONFIG_CMD_FLASH_TRISTATE
#undef CONFIG_CMD_FORCETIME
+#define CONFIG_CMD_GETTIME
#undef CONFIG_CMD_GPIO_EXTENDED
#undef CONFIG_CMD_GSV
#define CONFIG_CMD_HASH