From 0451d33db85bef21e3ae1253817b874cea712b7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Barna=C5=9B?= Date: Mon, 18 Jan 2021 13:35:23 +0100 Subject: servo_v4p1: Remove unnecessary tasks in RW section MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ś Change-Id: Ib511690d609c84960720aa40b5d08b1f7f1360c9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2700294 Reviewed-by: Aseda Aboagye --- board/servo_v4p1/board.c | 22 ---------------------- board/servo_v4p1/ec.tasklist | 10 +++++----- 2 files changed, 5 insertions(+), 27 deletions(-) (limited to 'board/servo_v4p1') 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) -- cgit v1.2.1