diff options
author | Kyoung Kim <kyoung.il.kim@intel.com> | 2016-04-07 17:15:16 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-04-14 17:28:17 -0700 |
commit | e6902404a2cea8e8c2f6f9839f41c5434264b59d (patch) | |
tree | 8b88061680b15deb48d400afcdac0b68e2560621 | |
parent | e07d460d549df5698fe983a0735da342f4f5a194 (diff) | |
download | chrome-ec-e6902404a2cea8e8c2f6f9839f41c5434264b59d.tar.gz |
Kunimitsu: remove console commands for code size
Remove following EC console commands to reduce code size:
- battfake
- apthrottle
And none of commands above are used in 'auto test'.
This is a squash of
- https://chromium-review.googlesource.com/337657
- https://chromium-review.googlesource.com/338018
BUG=none
BRANCH=firmware-glados-7820.B
TEST=make -j buildall
Change-Id: I11d2c5514f2714f0a46416feec2b2c47666fb462
Signed-off-by: Kyoung Kim <kyoung.il.kim@intel.com>
Signed-off-by: Kevin K Wong <kevin.k.wong@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/338893
Reviewed-by: Shawn N <shawnn@chromium.org>
-rw-r--r-- | board/kunimitsu/board.h | 2 | ||||
-rw-r--r-- | common/panic_output.c | 3 | ||||
-rw-r--r-- | common/throttle_ap.c | 4 | ||||
-rw-r--r-- | driver/battery/smart.c | 2 | ||||
-rw-r--r-- | include/config.h | 3 |
5 files changed, 10 insertions, 4 deletions
diff --git a/board/kunimitsu/board.h b/board/kunimitsu/board.h index a26eb55e40..8e7d7b2225 100644 --- a/board/kunimitsu/board.h +++ b/board/kunimitsu/board.h @@ -154,6 +154,8 @@ /* Modules we want to exclude */ #undef CONFIG_CMD_ACCEL_INFO #undef CONFIG_CMD_ACCELS +#undef CONFIG_CMD_APTHROTTLE +#undef CONFIG_CMD_BATTFAKE #undef CONFIG_CMD_HASH #undef CONFIG_CMD_TEMP_SENSOR #undef CONFIG_CMD_TIMERINFO diff --git a/common/panic_output.c b/common/panic_output.c index 8d9cf2205d..42dc72515c 100644 --- a/common/panic_output.c +++ b/common/panic_output.c @@ -154,7 +154,7 @@ static void stack_overflow_recurse(int n) /*****************************************************************************/ /* Console commands */ - +#ifdef CONFIG_CMD_CRASH static int command_crash(int argc, char **argv) { if (argc < 2) @@ -191,6 +191,7 @@ DECLARE_CONSOLE_COMMAND(crash, command_crash, "[assert | divzero | stack | unaligned | watchdog] [options]", "Crash the system (for testing)", NULL); +#endif static int command_panicinfo(int argc, char **argv) { diff --git a/common/throttle_ap.c b/common/throttle_ap.c index d794970267..c9d1029c65 100644 --- a/common/throttle_ap.c +++ b/common/throttle_ap.c @@ -72,7 +72,7 @@ void throttle_ap(enum throttle_level level, /*****************************************************************************/ /* Console commands */ - +#ifdef CONFIG_CMD_APTHROTTLE static int command_apthrottle(int argc, char **argv) { int i; @@ -93,4 +93,4 @@ DECLARE_CONSOLE_COMMAND(apthrottle, command_apthrottle, NULL, "Display the AP throttling state", NULL); - +#endif diff --git a/driver/battery/smart.c b/driver/battery/smart.c index 66774e15a9..6f884a55b3 100644 --- a/driver/battery/smart.c +++ b/driver/battery/smart.c @@ -374,7 +374,7 @@ int battery_wait_for_stable(void) return EC_ERROR_NOT_POWERED; } -#ifndef CONFIG_CHARGER_V1 +#if !defined(CONFIG_CHARGER_V1) && defined(CONFIG_CMD_BATTFAKE) static int command_battfake(int argc, char **argv) { char *e; diff --git a/include/config.h b/include/config.h index 213ae6ee11..87df86c786 100644 --- a/include/config.h +++ b/include/config.h @@ -520,11 +520,14 @@ #undef CONFIG_CMD_ACCELS #undef CONFIG_CMD_ACCEL_INFO #undef CONFIG_CMD_ALS +#define CONFIG_CMD_APTHROTTLE #undef CONFIG_CMD_BATDEBUG +#define CONFIG_CMD_BATTFAKE #define CONFIG_CMD_CHARGER #undef CONFIG_CMD_CHGRAMP #undef CONFIG_CMD_CLOCKGATES #undef CONFIG_CMD_COMXTEST +#define CONFIG_CMD_CRASH #undef CONFIG_CMD_ECTEMP #define CONFIG_CMD_FASTCHARGE #undef CONFIG_CMD_FLASH |