summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew McRae <amcrae@google.com>2022-04-29 14:48:04 +1000
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-04-29 06:05:51 +0000
commitdba77e6e122cb0b6dd6a5561a6130574c06d9c19 (patch)
treeefa6bbdeec5af21e985f0b0ca89108fb6445ff8b
parentd1448c8c9d6b31af56d74c3fef19a548e336f00f (diff)
downloadchrome-ec-dba77e6e122cb0b6dd6a5561a6130574c06d9c19.tar.gz
zephyr: Do not shutdown alt mode for sysjump
Do not shutdown USB PD alt mode before a sysjump. When the shell console command 'sysjump' is used, the the task ID is invalid, causing the EC the hang waiting for the invalid task. TCMPv2 does not require the pre-sysjump preparation any more, since most connections now start in ErrorRecovery. This was previously required for situations when a monitor was connected, and the connection was required to be maintained across sysjump restarts. Now that the connection starts in ErrorRecovery, the monitor connection will be restarted. Previous behaviour is maintained for backwards compatibility, and this is only turned off for Zephyr based systems. BUG=b:230572489 TEST=zmake build nivviks; flash & run BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: Ib541105a3f1a1fd8b83b6363063df10981c84fed Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3616364 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
-rw-r--r--common/usb_pd_alt_mode_dfp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/usb_pd_alt_mode_dfp.c b/common/usb_pd_alt_mode_dfp.c
index cbf2d6bdf9..9e31edba61 100644
--- a/common/usb_pd_alt_mode_dfp.c
+++ b/common/usb_pd_alt_mode_dfp.c
@@ -144,6 +144,7 @@ static int validate_mode_request(struct svdm_amode_data *modep,
void pd_prepare_sysjump(void)
{
+#ifndef CONFIG_ZEPHYR
int i;
/* Exit modes before sysjump so we can cleanly enter again later */
@@ -160,6 +161,7 @@ void pd_prepare_sysjump(void)
task_wait_event_mask(TASK_EVENT_SYSJUMP_READY, -1);
sysjump_task_waiting = TASK_ID_INVALID;
}
+#endif /* CONFIG_ZEPHYR */
}
/*