samus_pd: remove host event commands module to save flash space

Remove host_event_commands.c from build to save flash space. The
PD MCU does not use host event infrastructure and instead has a
simple gpio line it uses to notify EC that it has info to share.

BUG=none
BRANCH=samus
TEST=make buildall. view the .map file and see we save about 700
bytes of flash.

Change-Id: I71b8a4e32b9ecb57eb1a57f6d28652476ee6afe6
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/231444
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
Alec Berg
2014-11-21 15:43:56 -08:00
committed by chrome-internal-fetch
parent 446002d2f8
commit bebce8dca1
4 changed files with 14 additions and 3 deletions

View File

@@ -24,6 +24,7 @@
#undef CONFIG_CONSOLE_CMDHELP
#define CONFIG_FORCE_CONSOLE_RESUME
#define CONFIG_HIBERNATE_WAKEUP_PINS (STM32_PWR_CSR_EWUP3|STM32_PWR_CSR_EWUP8)
#undef CONFIG_HOSTCMD_EVENTS
#define CONFIG_HW_CRC
#define CONFIG_I2C
#undef CONFIG_LID_SWITCH

View File

@@ -45,6 +45,8 @@ common-$(CONFIG_EXTPOWER_SPRING)+=extpower_spring.o
common-$(CONFIG_FANS)+=fan.o
common-$(CONFIG_FLASH)+=flash.o
common-$(CONFIG_FMAP)+=fmap.o
common-$(CONFIG_GESTURE_DETECTION)+=gesture.o
common-$(CONFIG_HOSTCMD_EVENTS)+=host_event_commands.o
common-$(CONFIG_I2C)+=i2c.o
common-$(CONFIG_I2C_ARBITRATION)+=i2c_arbitration.o
common-$(CONFIG_INDUCTIVE_CHARGING)+=inductive_charging.o
@@ -52,6 +54,7 @@ common-$(CONFIG_KEYBOARD_PROTOCOL_8042)+=keyboard_8042.o
common-$(CONFIG_KEYBOARD_PROTOCOL_MKBP)+=keyboard_mkbp.o
common-$(CONFIG_KEYBOARD_TEST)+=keyboard_test.o
common-$(CONFIG_LED_COMMON)+=led_common.o
common-$(CONFIG_LID_ANGLE)+=motion_lid.o
common-$(CONFIG_LID_ANGLE_KEY_SCAN)+=lid_angle.o
common-$(CONFIG_LID_SWITCH)+=lid_switch.o
common-$(CONFIG_LPC)+=acpi.o port80.o
@@ -80,11 +83,9 @@ common-$(CONFIG_WIRELESS)+=wireless.o
common-$(HAS_TASK_CHIPSET)+=chipset.o
common-$(HAS_TASK_CONSOLE)+=console.o console_output.o uart_buffering.o
common-$(HAS_TASK_CONSOLE)+=memory_commands.o
common-$(HAS_TASK_HOSTCMD)+=host_command.o host_event_commands.o
common-$(HAS_TASK_HOSTCMD)+=host_command.o
common-$(HAS_TASK_PDCMD)+=host_command_master.o host_command_pd.o
common-$(HAS_TASK_KEYSCAN)+=keyboard_scan.o
common-$(HAS_TASK_LIGHTBAR)+=lb_common.o lightbar.o
common-$(HAS_TASK_MOTIONSENSE)+=motion_sense.o math_util.o
common-$(CONFIG_GESTURE_DETECTION)+=gesture.o
common-$(CONFIG_LID_ANGLE)+=motion_lid.o
common-$(TEST_BUILD)+=test_util.o

View File

@@ -379,8 +379,10 @@ static void host_command_init(void)
*host_get_memmap(EC_MEMMAP_ID_VERSION) = 1;
*host_get_memmap(EC_MEMMAP_EVENTS_VERSION) = 1;
#ifdef CONFIG_HOSTCMD_EVENTS
host_set_single_event(EC_HOST_EVENT_INTERFACE_READY);
CPRINTS("hostcmd init 0x%x", host_get_events());
#endif
}
void host_command_task(void)

View File

@@ -611,6 +611,13 @@
*/
#undef CONFIG_HOSTCMD_I2C_SLAVE_ADDR
/* If we have host command task, assume we also are using host events. */
#ifdef HAS_TASK_HOSTCMD
#define CONFIG_HOSTCMD_EVENTS
#else
#undef CONFIG_HOSTCMD_EVENTS
#endif
/*****************************************************************************/
/* Enable debugging and profiling statistics for hook functions */