From 4fc672e12e40e5ceaf0950458a0fa4bc66931f1f Mon Sep 17 00:00:00 2001 From: Caveh Jalali Date: Wed, 24 Jun 2020 20:39:57 -0700 Subject: sn5s330: initialize chip after EFS2 sysjump this fixes an issue where the pcc was not fully initialized as intended due to EFS2 interactions. when EFS2 is enabled, we sysjump to RW very early - before INIT_HOOKS run. any code in pd_task that is predicated by system_jumped_to_this_image() will either always run or never run. this is not the intended behavior. sn5s330_init() is called from ppc_init() which runs as part of initialization done by pd_task(). we now need to check system_jumped_late() instead of system_jumped_to_this_image() to get the intended behavior. BRANCH=none BUG=b:159769490, chromium:1072743 TEST=verified all of sn5s330_init() now runs using additional debug printfs. Change-Id: I3a8e6627e6e57e22b287b3f97bc79b0f3a07e5fa Signed-off-by: Caveh Jalali Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2265608 Reviewed-by: Keith Short Reviewed-by: Daisuke Nojiri Commit-Queue: Keith Short Tested-by: Keith Short --- driver/ppc/sn5s330.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver/ppc/sn5s330.c b/driver/ppc/sn5s330.c index 5dbc02437b..0aaabdfeca 100644 --- a/driver/ppc/sn5s330.c +++ b/driver/ppc/sn5s330.c @@ -343,7 +343,7 @@ static int sn5s330_init(int port) * Don't proceed with the rest of initialization if we're sysjumping. * We would have already done this before. */ - if (system_jumped_to_this_image()) + if (system_jumped_late()) return EC_SUCCESS; /* -- cgit v1.2.1