From 3e7a4144243e8e67f405063e052d12572969473b Mon Sep 17 00:00:00 2001 From: Peter Marheine Date: Thu, 21 Jul 2022 15:23:43 +1000 Subject: nissa: run a single task for USB chargers This saves about 1400 bytes of RAM on Nereid. BUG=b:226411332 TEST=BC1.2 messages still appear on Nereid console when chargers are plugged or unplugged from either USB-C port. BRANCH=none Signed-off-by: Peter Marheine Change-Id: I85d6d8419bc894b3bbedf43c0ab5e78336c402d5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3778909 Reviewed-by: Fabio Baltieri Reviewed-by: Andrew McRae --- zephyr/projects/nissa/prj.conf | 3 +-- zephyr/projects/nissa/src/sub_board.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/zephyr/projects/nissa/prj.conf b/zephyr/projects/nissa/prj.conf index 325ef462d7..cb4f78cc48 100644 --- a/zephyr/projects/nissa/prj.conf +++ b/zephyr/projects/nissa/prj.conf @@ -119,8 +119,7 @@ CONFIG_PLATFORM_EC_USB_MUX_VIRTUAL=y # ADL integrated muxes are slow: unblock PD CONFIG_PLATFORM_EC_USB_MUX_TASK=y CONFIG_PLATFORM_EC_BC12_DETECT_PI3USB9201=y -# TODO(b/226411332): fix single task USB_CHG for Nissa -CONFIG_PLATFORM_EC_USB_CHARGER_SINGLE_TASK=n +CONFIG_PLATFORM_EC_USB_CHARGER_SINGLE_TASK=y # USB-C TCPC and PPC standard options CONFIG_PLATFORM_EC_USB_PD_TCPC_LOW_POWER=y diff --git a/zephyr/projects/nissa/src/sub_board.c b/zephyr/projects/nissa/src/sub_board.c index e567fd0054..ad0f1a33a2 100644 --- a/zephyr/projects/nissa/src/sub_board.c +++ b/zephyr/projects/nissa/src/sub_board.c @@ -157,8 +157,7 @@ static void nereid_subboard_config(void) gpio_pin_configure_dt(GPIO_DT_FROM_ALIAS(gpio_usb_c1_int_odl), GPIO_INPUT | GPIO_PULL_UP); } else { - /* Disable the port 1 charger task */ - task_disable_task(TASK_ID_USB_CHG_P1); + /* Port doesn't exist, doesn't need muxing */ usb_muxes[1].next_mux = NULL; } -- cgit v1.2.1