From aaa76256819c4a961073be3955fcc1668fa9e346 Mon Sep 17 00:00:00 2001 From: Alec Berg Date: Fri, 13 Feb 2015 11:51:14 -0800 Subject: samus: disable i2cscan console command to save space Disable the i2cscan console command by default to save space BUG=none BRANCH=samus TEST=make -j buildall From .map file, 512 bytes of flash saved Change-Id: I4bcb50b00e843abbc3523a3e0d4cc599a1e01d3a Signed-off-by: Alec Berg Reviewed-on: https://chromium-review.googlesource.com/249850 Reviewed-by: Vic Yang --- board/samus_pd/board.h | 9 +++++---- common/i2c.c | 2 ++ include/config.h | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/board/samus_pd/board.h b/board/samus_pd/board.h index 1fa894eef2..70a7f7d2fd 100644 --- a/board/samus_pd/board.h +++ b/board/samus_pd/board.h @@ -19,15 +19,16 @@ #define CONFIG_ADC #define CONFIG_BOARD_PRE_INIT #define CONFIG_CHARGE_MANAGER -#undef CONFIG_CMD_HASH -#undef CONFIG_CMD_TYPEC +#undef CONFIG_CMD_HASH +#undef CONFIG_CMD_TYPEC +#undef CONFIG_CMD_I2C_SCAN /* Minimum ilim = 500 mA */ #define CONFIG_CHARGER_INPUT_CURRENT PWM_0_MA -#undef CONFIG_CMD_IDLE_STATS +#undef CONFIG_CMD_IDLE_STATS #define CONFIG_COMMON_GPIO_SHORTNAMES #undef CONFIG_CONSOLE_CMDHELP #undef CONFIG_CONSOLE_HISTORY -#undef CONFIG_DEBUG_ASSERT +#undef CONFIG_DEBUG_ASSERT #define CONFIG_FORCE_CONSOLE_RESUME #define CONFIG_HIBERNATE_WAKEUP_PINS (STM32_PWR_CSR_EWUP3|STM32_PWR_CSR_EWUP8) #undef CONFIG_HOSTCMD_EVENTS diff --git a/common/i2c.c b/common/i2c.c index d423dffc25..da751c70ed 100644 --- a/common/i2c.c +++ b/common/i2c.c @@ -570,6 +570,7 @@ DECLARE_HOST_COMMAND(EC_CMD_I2C_PASSTHRU, i2c_command_passthru, EC_VER_MASK(0)); /*****************************************************************************/ /* Console commands */ +#ifdef CONFIG_CMD_I2C_SCAN static void scan_bus(int port, const char *desc) { int a; @@ -624,6 +625,7 @@ DECLARE_CONSOLE_COMMAND(i2cscan, command_scan, NULL, "Scan I2C ports for devices", NULL); +#endif static int command_i2cxfer(int argc, char **argv) { diff --git a/include/config.h b/include/config.h index 1c0e0fb2c5..af14aeae19 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_I2C_SCAN #define CONFIG_CMD_IDLE_STATS #undef CONFIG_CMD_ILIM #undef CONFIG_CMD_JUMPTAGS -- cgit v1.2.1