diff options
author | Michał Barnaś <mb@semihalf.com> | 2021-01-18 13:35:23 +0100 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-02-18 17:36:28 +0000 |
commit | 0451d33db85bef21e3ae1253817b874cea712b7e (patch) | |
tree | cf3875e3713d37a03c0369cd8c45bc2aa8ef038d /board/servo_v4p1 | |
parent | e9caffb433fdf9724a6f959a341e9d3792b82f50 (diff) | |
download | chrome-ec-0451d33db85bef21e3ae1253817b874cea712b7e.tar.gz |
servo_v4p1: Remove unnecessary tasks in RW section
USB PD tasks had empty stubs in RW section.
Instead of creating empty tasks in RW section, they are
enabled only in RO section using ALWAYS_RO macro in ec.tasklist.
BRANCH=main
BUG=b:177412115
TEST=Execute 'make BOARD=servo_v4p1'
It should create firmware without errors.
Try flashing built firmware twice (with --force flag)
to see that servo communication is working fine
with updated RW section.
Signed-off-by: Michał Barnaś <mb@semihalf.com>
Change-Id: Ib511690d609c84960720aa40b5d08b1f7f1360c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2700294
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board/servo_v4p1')
-rw-r--r-- | board/servo_v4p1/board.c | 22 | ||||
-rw-r--r-- | board/servo_v4p1/ec.tasklist | 10 |
2 files changed, 5 insertions, 27 deletions
diff --git a/board/servo_v4p1/board.c b/board/servo_v4p1/board.c index df932517ff..fe51ebb30d 100644 --- a/board/servo_v4p1/board.c +++ b/board/servo_v4p1/board.c @@ -207,28 +207,6 @@ void ext_hpd_detection_enable(int enable) gpio_disable_interrupt(GPIO_DP_HPD); } } -#else -void snk_task(void *u) -{ - /* DO NOTHING */ -} - -void pd_task(void *u) -{ - /* DO NOTHING */ -} -__override uint8_t board_get_usb_pd_port_count(void) -{ - return CONFIG_USB_PD_PORT_MAX_COUNT; -} - -void pd_set_suspend(int port, int suspend) -{ - /* - * Do nothing. This is only here to make the linker happy for this - * old board on ToT. - */ -} #endif /* SECTION_IS_RO */ #include "gpio_list.h" diff --git a/board/servo_v4p1/ec.tasklist b/board/servo_v4p1/ec.tasklist index 3004799adf..07250f018e 100644 --- a/board/servo_v4p1/ec.tasklist +++ b/board/servo_v4p1/ec.tasklist @@ -7,8 +7,8 @@ * See CONFIG_TASK_LIST in config.h for details. */ #define CONFIG_TASK_LIST \ - TASK_ALWAYS(HOOKS, hook_task, NULL, VENTI_TASK_STACK_SIZE) \ - TASK_ALWAYS(CONSOLE, console_task, NULL, VENTI_TASK_STACK_SIZE) \ - TASK_ALWAYS(PD_C0, pd_task, NULL, ULTRA_TASK_STACK_SIZE) \ - TASK_ALWAYS(PD_C1, pd_task, NULL, ULTRA_TASK_STACK_SIZE) \ - TASK_ALWAYS(PD_C2, snk_task, NULL, VENTI_TASK_STACK_SIZE) + TASK_ALWAYS(HOOKS, hook_task, NULL, VENTI_TASK_STACK_SIZE) \ + TASK_ALWAYS(CONSOLE, console_task, NULL, VENTI_TASK_STACK_SIZE) \ + TASK_ALWAYS_RO(PD_C0, pd_task, NULL, ULTRA_TASK_STACK_SIZE) \ + TASK_ALWAYS_RO(PD_C1, pd_task, NULL, ULTRA_TASK_STACK_SIZE) \ + TASK_ALWAYS_RO(PD_C2, snk_task, NULL, VENTI_TASK_STACK_SIZE) |