summaryrefslogtreecommitdiff
path: root/board/mchpevb1
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2021-01-28 14:17:45 -0800
committerCommit Bot <commit-bot@chromium.org>2021-02-22 23:23:46 +0000
commite0b50372154ff2f0cdc094548e563de330d13018 (patch)
treeefe0c6d34e31616c7f354eba6d2d34721559aca1 /board/mchpevb1
parent57e2fc8d1199db376736426cd3bce26c090fc2f5 (diff)
downloadchrome-ec-e0b50372154ff2f0cdc094548e563de330d13018.tar.gz
board: Remove HAS_TASK_MOTIONSENSE when always defined
ifdef HAS_TASK_MOTIONSENSE is only necessary for board that may not have sensor. Only oak board may be compiled without the sensor stack. BUG=none BRANCH=none TEST=compile. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Change-Id: I7d8e4ff1a647e73251b91a185780025bfae78187 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2693915 Reviewed-by: Alexandru M Stan <amstan@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board/mchpevb1')
-rw-r--r--board/mchpevb1/board.c6
-rw-r--r--board/mchpevb1/ec.tasklist4
2 files changed, 2 insertions, 8 deletions
diff --git a/board/mchpevb1/board.c b/board/mchpevb1/board.c
index b80db787cd..f9c74c89fe 100644
--- a/board/mchpevb1/board.c
+++ b/board/mchpevb1/board.c
@@ -88,10 +88,8 @@ static int smart_batt_temp;
static int ds1624_temp;
static int sb_temp(int idx, int *temp_ptr);
static int ds1624_get_val(int idx, int *temp_ptr);
-#ifdef HAS_TASK_MOTIONSENSE
static void board_spi_enable(void);
static void board_spi_disable(void);
-#endif
#ifdef CONFIG_BOARD_PRE_INIT
/*
@@ -561,13 +559,11 @@ static void board_init(void)
/* Provide AC status to the PCH */
gpio_set_level(GPIO_PCH_ACOK, extpower_is_present());
-#ifdef HAS_TASK_MOTIONSENSE
if (system_jumped_late() &&
chipset_in_state(CHIPSET_STATE_ON)) {
trace0(0, BRD, 0, "board_init: S0 call board_spi_enable");
board_spi_enable();
}
-#endif
}
DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
@@ -906,7 +902,6 @@ static void board_one_sec(void)
}
DECLARE_HOOK(HOOK_SECOND, board_one_sec, HOOK_PRIO_DEFAULT);
-#ifdef HAS_TASK_MOTIONSENSE
/* Motion sensors */
static struct mutex g_base_mutex;
@@ -1018,7 +1013,6 @@ static void board_spi_disable(void)
}
DECLARE_HOOK(HOOK_CHIPSET_SHUTDOWN, board_spi_disable,
MOTION_SENSE_HOOK_PRIO + 1);
-#endif /* defined(HAS_TASK_MOTIONSENSE) */
#ifdef MEC1701_EVB_TACH_TEST /* PWM/TACH test */
void tach0_isr(void)
diff --git a/board/mchpevb1/ec.tasklist b/board/mchpevb1/ec.tasklist
index cdfdd45163..6fcd5faa98 100644
--- a/board/mchpevb1/ec.tasklist
+++ b/board/mchpevb1/ec.tasklist
@@ -9,10 +9,10 @@
#define CONFIG_TASK_LIST \
TASK_ALWAYS(HOOKS, hook_task, NULL, LARGER_TASK_STACK_SIZE) \
TASK_NOTEST(CHIPSET, chipset_task, NULL, LARGER_TASK_STACK_SIZE) \
- TASK_ALWAYS(MOTIONSENSE, motion_sense_task, NULL, LARGER_TASK_STACK_SIZE) \
+ TASK_ALWAYS(MOTIONSENSE, motion_sense_task, NULL, LARGER_TASK_STACK_SIZE) \
TASK_NOTEST(KEYPROTO, keyboard_protocol_task, NULL, TASK_STACK_SIZE) \
TASK_ALWAYS(HOSTCMD, host_command_task, NULL, TASK_STACK_SIZE) \
TASK_ALWAYS(CONSOLE, console_task, NULL, LARGER_TASK_STACK_SIZE) \
TASK_ALWAYS(POWERBTN, power_button_task, NULL, LARGER_TASK_STACK_SIZE) \
- TASK_NOTEST(KEYSCAN, keyboard_scan_task, NULL, TASK_STACK_SIZE)
+ TASK_NOTEST(KEYSCAN, keyboard_scan_task, NULL, TASK_STACK_SIZE)