From 7cbc5a0186d8d5fc36e2f54a0a7020354c8e00d7 Mon Sep 17 00:00:00 2001 From: Alec Berg Date: Wed, 4 Mar 2015 12:24:33 -0800 Subject: samus_pd: disable i2cxfer console command to save space Disable the i2cxfer console command by default to save space BUG=chrome-os-partner:37167 BRANCH=samus TEST=make -j buildall From .map file, 576 bytes of flash saved Change-Id: I0b50161ef0a49231e45c422da5042db77874aed1 Signed-off-by: Alec Berg Reviewed-on: https://chromium-review.googlesource.com/256071 Reviewed-by: Vincent Palatin Reviewed-by: Todd Broch --- board/samus_pd/board.h | 1 + common/i2c.c | 2 ++ include/config.h | 1 + 3 files changed, 4 insertions(+) diff --git a/board/samus_pd/board.h b/board/samus_pd/board.h index 15a865565a..97a20b302c 100644 --- a/board/samus_pd/board.h +++ b/board/samus_pd/board.h @@ -23,6 +23,7 @@ #undef CONFIG_CMD_HASH #undef CONFIG_CMD_TYPEC #undef CONFIG_CMD_I2C_SCAN +#undef CONFIG_CMD_I2C_XFER /* Minimum ilim = 500 mA */ #define CONFIG_CHARGER_INPUT_CURRENT PWM_0_MA #undef CONFIG_CMD_IDLE_STATS diff --git a/common/i2c.c b/common/i2c.c index da751c70ed..05d7f1a703 100644 --- a/common/i2c.c +++ b/common/i2c.c @@ -627,6 +627,7 @@ DECLARE_CONSOLE_COMMAND(i2cscan, command_scan, NULL); #endif +#ifdef CONFIG_CMD_I2C_XFER static int command_i2cxfer(int argc, char **argv) { int port, slave_addr; @@ -706,3 +707,4 @@ DECLARE_CONSOLE_COMMAND(i2cxfer, command_i2cxfer, "r/r16/rlen/w/w16 port addr offset [value | len]", "Read write I2C", NULL); +#endif diff --git a/include/config.h b/include/config.h index 245d50301b..dc375be962 100644 --- a/include/config.h +++ b/include/config.h @@ -356,6 +356,7 @@ #define CONFIG_CMD_HASH #undef CONFIG_CMD_HOSTCMD #define CONFIG_CMD_I2C_SCAN +#define CONFIG_CMD_I2C_XFER #define CONFIG_CMD_IDLE_STATS #undef CONFIG_CMD_ILIM #undef CONFIG_CMD_JUMPTAGS -- cgit v1.2.1