From fc144e940ca89a020880645a823d5c2258aae8c4 Mon Sep 17 00:00:00 2001 From: Alec Berg Date: Sat, 21 Feb 2015 16:54:08 -0800 Subject: samus_pd: make shmem command optional, disable on samus_pd To save flash space, disable "shmem" console command on samus_pd to save 128 bytes. BUG=none BRANCH=samus_pd TEST=make-j buildall Change-Id: I0d0277a0c4a80dffd90dcbf2c3ee77eba2408c57 Signed-off-by: Alec Berg Reviewed-on: https://chromium-review.googlesource.com/251911 Reviewed-by: Shawn N --- board/samus_pd/board.h | 1 + common/shared_mem.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 be567cf16d..15a865565a 100644 --- a/board/samus_pd/board.h +++ b/board/samus_pd/board.h @@ -26,6 +26,7 @@ /* Minimum ilim = 500 mA */ #define CONFIG_CHARGER_INPUT_CURRENT PWM_0_MA #undef CONFIG_CMD_IDLE_STATS +#undef CONFIG_CMD_SHMEM #define CONFIG_COMMON_GPIO_SHORTNAMES #undef CONFIG_CONSOLE_CMDHELP #undef CONFIG_CONSOLE_HISTORY diff --git a/common/shared_mem.c b/common/shared_mem.c index 219019ef62..4060b68a58 100644 --- a/common/shared_mem.c +++ b/common/shared_mem.c @@ -52,6 +52,7 @@ void shared_mem_release(void *ptr) buf_in_use = 0; } +#ifdef CONFIG_CMD_SHMEM static int command_shmem(int argc, char **argv) { ccprintf("Size:%6d\n", shared_mem_size()); @@ -63,3 +64,4 @@ DECLARE_CONSOLE_COMMAND(shmem, command_shmem, NULL, "Print shared memory stats", NULL); +#endif diff --git a/include/config.h b/include/config.h index f458b670b9..f88b7fde54 100644 --- a/include/config.h +++ b/include/config.h @@ -369,6 +369,7 @@ #undef CONFIG_CMD_POWERLED #undef CONFIG_CMD_RTC_ALARM #undef CONFIG_CMD_SCRATCHPAD +#define CONFIG_CMD_SHMEM #undef CONFIG_CMD_SLEEP #undef CONFIG_CMD_SPI_FLASH #undef CONFIG_CMD_STACKOVERFLOW -- cgit v1.2.1