summaryrefslogtreecommitdiff
path: root/zephyr/Kconfig.system
diff options
context:
space:
mode:
authorWealian Liao <whliao@nuvoton.corp-partner.google.com>2021-02-26 10:16:11 +0800
committerCommit Bot <commit-bot@chromium.org>2021-03-24 17:27:46 +0000
commit893a8b354f45750e50a419670307fcc2e59ba4cb (patch)
tree224363e0c91e48b4cfb689a84f40e9afcdeef7c7 /zephyr/Kconfig.system
parent09d0027924a74efaa8d1b55805af11377962d180 (diff)
downloadchrome-ec-893a8b354f45750e50a419670307fcc2e59ba4cb.tar.gz
zephyr: npcx: add reset cause check
The reset cause will influence the initialization flow. We define some of initial flow of the reset cause for the following development. This CL include the following: 1. Add check_reset_cause() which sets the system reset flag. 2. Add chip_bbram_status_check() to clear the error status & show the error message. 3. Add CONFIG_BOARD_RESET_AFTER_POWER_ON feature. 4. Define the initialize flow for reset cause. BRANCH=none BUG=b:178101173 TEST=check the following reset cause by 'sysinfo' 1. power-up 2. reset-pin reset 3. soft by 'reboot' console command 4. watchdog by 'waitms 2000' Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com> Change-Id: I515868d8cda4544fdbe782210b0108b4dda0d8cc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2731180 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'zephyr/Kconfig.system')
-rw-r--r--zephyr/Kconfig.system18
1 files changed, 18 insertions, 0 deletions
diff --git a/zephyr/Kconfig.system b/zephyr/Kconfig.system
new file mode 100644
index 0000000000..d8ae87b149
--- /dev/null
+++ b/zephyr/Kconfig.system
@@ -0,0 +1,18 @@
+# Copyright 2021 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+if PLATFORM_EC
+
+config PLATFORM_EC_SYSTEM_PRE_INIT_PRIORITY
+ int "System pre-initialization priority"
+ default 20
+ range 0 99
+ help
+ This defines the initialization priority for the CROS
+ system_pre_init() function. system_pre_init() reads chip level reset
+ cause and stores it into the system reset flags. All drivers, except
+ those critical to determining the reset type, should be initialized at
+ lower priority so that the system reset flags are valid.
+
+endif # PLATFORM_EC