summaryrefslogtreecommitdiff
path: root/zephyr/Kconfig
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-01-21 10:57:32 -0700
committerCommit Bot <commit-bot@chromium.org>2021-01-22 22:53:14 +0000
commit78acb0eeac7e3e42dae13f907440d92d3e6c1aac (patch)
tree5f8486674ec967233a350ac5fbde20951923e6d0 /zephyr/Kconfig
parent9c2c2455beaa6bc5851bfae11740f05aaecb312b (diff)
downloadchrome-ec-78acb0eeac7e3e42dae13f907440d92d3e6c1aac.tar.gz
zephyr: Add support for CHIPSET_RESET_HOOK
Add the options for this and call the hook when enabled. We could avoid the #ifdef by always having espi_reset_handler(). I'm not sure if there is a better way. BUG=b:178104134 BRANCH=none TEST=build for zephyr not sure how to test this feature? Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I68d15bb112bc708af6f65befd08f05cb6bc209e0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2642891 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'zephyr/Kconfig')
-rw-r--r--zephyr/Kconfig15
1 files changed, 15 insertions, 0 deletions
diff --git a/zephyr/Kconfig b/zephyr/Kconfig
index 822d75f65d..d83f53c884 100644
--- a/zephyr/Kconfig
+++ b/zephyr/Kconfig
@@ -90,6 +90,21 @@ config PLATFORM_EC_CBI
https://chromium.googlesource.com/chromiumos/docs/+/master/design_docs/cros_board_info.md
+config PLATFORM_EC_CHIPSET_RESET_HOOK
+ bool "Provide a hook for when the AP resets"
+ default y
+ help
+ Enables support for the HOOK_CHIPSET_RESET hook. This can be used by
+ code that needs to run before a programmatic reset actually happens.
+ Note that these hooks don't run with a cold reset, only when the AP
+ decides to reset itself.
+
+ You can declare a hook like this:
+
+ DECLARE_HOOK(HOOK_CHIPSET_RESET, do_something, HOOK_PRIO_DEFAULT);
+
+ Then do_something() will be called just before the reset happens.
+
menuconfig PLATFORM_EC_ESPI
bool "eSPI"
depends on ESPI && AP