summaryrefslogtreecommitdiff
path: root/board/poppy
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/poppy
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/poppy')
-rw-r--r--board/poppy/base_detect_poppy.c2
-rw-r--r--board/poppy/board.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/board/poppy/base_detect_poppy.c b/board/poppy/base_detect_poppy.c
index dc4341d51a..358461896e 100644
--- a/board/poppy/base_detect_poppy.c
+++ b/board/poppy/base_detect_poppy.c
@@ -241,7 +241,7 @@ static void base_init(void)
* If we jumped to this image and chipset is already in S0, enable
* base.
*/
- if (system_jumped_to_this_image() && chipset_in_state(CHIPSET_STATE_ON))
+ if (system_jumped_late() && chipset_in_state(CHIPSET_STATE_ON))
base_enable();
}
DECLARE_HOOK(HOOK_INIT, base_init, HOOK_PRIO_DEFAULT+1);
diff --git a/board/poppy/board.c b/board/poppy/board.c
index ddd0721591..dccf04a3cd 100644
--- a/board/poppy/board.c
+++ b/board/poppy/board.c
@@ -289,7 +289,7 @@ void board_tcpc_init(void)
int reg;
/* Only reset TCPC if not sysjump */
- if (!system_jumped_to_this_image()) {
+ if (!system_jumped_late()) {
gpio_set_level(GPIO_PP3300_USB_PD, 1);
/* TODO(crosbug.com/p/61098): How long do we need to wait? */
msleep(10);
@@ -492,7 +492,7 @@ static void board_pmic_init(void)
{
board_report_pmic_fault("SYSJUMP");
- if (system_jumped_to_this_image())
+ if (system_jumped_late())
return;
/* DISCHGCNT3 - enable 100 ohm discharge on V1.00A */