summaryrefslogtreecommitdiff
path: root/common/system.c
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2020-04-20 11:07:25 -0700
committerCommit Bot <commit-bot@chromium.org>2020-04-21 06:51:20 +0000
commitd174f05944c3d80125aac081682e703ed0c22f0d (patch)
tree5081ee2d347525b319ec2b117f77fb4adde46c14 /common/system.c
parentc1c5a9393c054a6a49b23e7f2b11cc16442b897c (diff)
downloadchrome-ec-d174f05944c3d80125aac081682e703ed0c22f0d.tar.gz
USB/PD: Skip pd_prepare_sysjump for EFS2 boards
Since in EFS2, USB/PD won't be enabled in RO or if it's enabled in RO, EC won't jump to RW, pd_prepare_sysjump is not needed. Even if PD is enabled because the device is not write protected, EFS2 jumps to RW before PD tasks start. So, there is no states to clean up. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=chromium:1072743, b:137493121, b:154440914 BRANCH=none TEST=Boot Puff successfully. Change-Id: Ie598105779d2a605cb63842cb6c8428f0e2c5367 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2157728 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Kangheui Won <khwon@chromium.org> Commit-Queue: Kangheui Won <khwon@chromium.org> Tested-by: Kangheui Won <khwon@chromium.org>
Diffstat (limited to 'common/system.c')
-rw-r--r--common/system.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/common/system.c b/common/system.c
index 72a3244fb0..610363a61a 100644
--- a/common/system.c
+++ b/common/system.c
@@ -496,10 +496,16 @@ static void jump_to_image(uintptr_t init_addr)
usleep(MSEC);
gpio_set_level(GPIO_ENTERING_RW, 0);
-#ifdef CONFIG_USB_PD_ALT_MODE_DFP
- /* Note: must be before i2c module is locked down */
- pd_prepare_sysjump();
-#endif
+ /*
+ * Since in EFS2, USB/PD won't be enabled in RO or if it's enabled in
+ * RO, EC won't jump to RW, pd_prepare_sysjump is not needed. Even if
+ * PD is enabled because the device is not write protected, EFS2 jumps
+ * to RW before PD tasks start. So, there is no states to clean up.
+ */
+ if (!IS_ENABLED(CONFIG_VBOOT_EFS2) &&
+ IS_ENABLED(CONFIG_USB_PD_ALT_MODE_DFP))
+ /* Note: must be before i2c module is locked down */
+ pd_prepare_sysjump();
#ifdef CONFIG_I2C_MASTER
/* Prepare I2C module for sysjump */