summaryrefslogtreecommitdiff
path: root/board/mchpevb1/board.c
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2020-06-25 11:51:03 -0700
committerCommit Bot <commit-bot@chromium.org>2020-06-26 04:07:10 +0000
commitd4c7f30feeab294406e2643183c6bd7e3095edfe (patch)
treee35d30993df605e2076630be17f137f5d5bc48b3 /board/mchpevb1/board.c
parent62c32d5010d8d12ca53ac9205d7172300f9f22ea (diff)
downloadchrome-ec-d4c7f30feeab294406e2643183c6bd7e3095edfe.tar.gz
EFS2 boards need to call system_jumped_late in HOOK_INIT to avoid running init code twice per boot. system_jumped_to_this_image and system_jumped_late are functionally equivalent for non EFS2 boards. This patch will prevent system_jumped_to_this_image from being used for EFS2 boards when code is copied from a past project. BUG=chromium:1072743 BRANCH=none TEST=buildall Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: I73fb5cedc5325d1c80825f9346954013046ee1df Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2267685 Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'board/mchpevb1/board.c')
-rw-r--r--board/mchpevb1/board.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/board/mchpevb1/board.c b/board/mchpevb1/board.c
index c8dc130821..79f104ff55 100644
--- a/board/mchpevb1/board.c
+++ b/board/mchpevb1/board.c
@@ -485,7 +485,7 @@ static void board_pmic_init(void)
int rv, cfg;
/* No need to re-init PMIC since settings are sticky across sysjump */
- if (system_jumped_to_this_image())
+ if (system_jumped_late())
return;
#if 0 /* BD99992GW PMIC on a real Chromebook */
@@ -562,7 +562,7 @@ static void board_init(void)
gpio_set_level(GPIO_PCH_ACOK, extpower_is_present());
#ifdef HAS_TASK_MOTIONSENSE
- if (system_jumped_to_this_image() &&
+ if (system_jumped_late() &&
chipset_in_state(CHIPSET_STATE_ON)) {
trace0(0, BRD, 0, "board_init: S0 call board_spi_enable");
board_spi_enable();
@@ -781,7 +781,7 @@ static void board_handle_reboot(void)
CPRINTS("MEC HOOK_INIT - called board_handle_reboot");
trace0(0, HOOK, 0, "HOOK_INIT - board_handle_reboot");
- if (system_jumped_to_this_image())
+ if (system_jumped_late())
return;
if (system_get_board_version() < BOARD_MIN_ID_LOD_EN)