summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2015-01-16 10:12:49 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-02-18 04:52:49 +0000
commit4b774f07d3004e8af0c4e825e0495768d29cabf9 (patch)
treeae91a89977eeb41d1635cb90abebee39a6a33c12
parent275606d104183c09ecabae3affa914e9f3b22926 (diff)
downloadchrome-ec-4b774f07d3004e8af0c4e825e0495768d29cabf9.tar.gz
make idlestats console command optional
To save flash space, disable "idlestats" console command on samus_pd. This saves 384 B of flash Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=samus BUG=chrome-os-partner:34489 TEST=make buildall and check firmware size. === build/samus_pd/ BASELINE === FLASH 57.8k / 60.0k [ text 48.0k rodat 9.7k data 0.1k ] RAM 11.8k / 16.0k [ data 0.1k bss 11.7k ] === #undef CONFIG_CMD_IDLE_STATS === FLASH 57.4k / 60.0k [ text 47.9k rodat 9.4k data 0.1k ] RAM 11.8k / 16.0k [ data 0.1k bss 11.7k ] Change-Id: Iba9654a88ec195026945881bc2687a1e67747706 Reviewed-on: https://chromium-review.googlesource.com/241452 Reviewed-by: Alec Berg <alecaberg@chromium.org> Commit-Queue: Alec Berg <alecaberg@chromium.org> Tested-by: Alec Berg <alecaberg@chromium.org>
-rw-r--r--board/samus_pd/board.h1
-rw-r--r--chip/stm32/clock-stm32f0.c2
-rw-r--r--include/config.h1
3 files changed, 4 insertions, 0 deletions
diff --git a/board/samus_pd/board.h b/board/samus_pd/board.h
index 641f78ece1..1fa894eef2 100644
--- a/board/samus_pd/board.h
+++ b/board/samus_pd/board.h
@@ -23,6 +23,7 @@
#undef CONFIG_CMD_TYPEC
/* Minimum ilim = 500 mA */
#define CONFIG_CHARGER_INPUT_CURRENT PWM_0_MA
+#undef CONFIG_CMD_IDLE_STATS
#define CONFIG_COMMON_GPIO_SHORTNAMES
#undef CONFIG_CONSOLE_CMDHELP
#undef CONFIG_CONSOLE_HISTORY
diff --git a/chip/stm32/clock-stm32f0.c b/chip/stm32/clock-stm32f0.c
index e6ed36e898..5fcf8f7dfd 100644
--- a/chip/stm32/clock-stm32f0.c
+++ b/chip/stm32/clock-stm32f0.c
@@ -515,6 +515,7 @@ DECLARE_CONSOLE_COMMAND(rtc_alarm, command_rtc_alarm_test,
#endif /* CONFIG_CMD_RTC_ALARM */
#if defined(CONFIG_LOW_POWER_IDLE) && defined(CONFIG_COMMON_RUNTIME)
+#ifdef CONFIG_CMD_IDLE_STATS
/**
* Print low power idle statistics
*/
@@ -536,5 +537,6 @@ DECLARE_CONSOLE_COMMAND(idlestats, command_idle_stats,
"",
"Print last idle stats",
NULL);
+#endif /* CONFIG_CMD_IDLE_STATS */
#endif
diff --git a/include/config.h b/include/config.h
index a6d7d6cfb6..1c0e0fb2c5 100644
--- a/include/config.h
+++ b/include/config.h
@@ -343,6 +343,7 @@
#undef CONFIG_CMD_GSV
#define CONFIG_CMD_HASH
#undef CONFIG_CMD_HOSTCMD
+#define CONFIG_CMD_IDLE_STATS
#undef CONFIG_CMD_ILIM
#undef CONFIG_CMD_JUMPTAGS
#define CONFIG_CMD_PD