summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlec Berg <alecaberg@chromium.org>2015-03-04 12:24:33 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-03-06 03:50:43 +0000
commit7cbc5a0186d8d5fc36e2f54a0a7020354c8e00d7 (patch)
tree07458ebee6c63e9ef74eaeadad51b9a03e8d6165
parent4fe8e91fdefc9a4afb466c00cd4a08ccbd93485a (diff)
downloadchrome-ec-7cbc5a0186d8d5fc36e2f54a0a7020354c8e00d7.tar.gz
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 <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/256071 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Todd Broch <tbroch@chromium.org>
-rw-r--r--board/samus_pd/board.h1
-rw-r--r--common/i2c.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 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