diff options
author | Aseda Aboagye <aaboagye@google.com> | 2020-02-15 13:28:19 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-02-21 10:30:10 +0000 |
commit | f5e6d1888ac11686305c55fcc54f74ef131c6792 (patch) | |
tree | 9936e58253e1f5186f72af2fb97b4d19ba173077 | |
parent | b7b3d637ead031ce244f192cbcb5c1dad91e487e (diff) | |
download | chrome-ec-f5e6d1888ac11686305c55fcc54f74ef131c6792.tar.gz |
intel_x86: Add CONFIG_BOARD_HAS_AFTER_RSMRST
Some x86 boards need to perform some workarounds after handling
RSMRST_L, therefore this commit adds a CONFIG_* option to enable this,
CONFIG_BOARD_HAS_AFTER_RSMRST. A board callback, board_after_rsmrst()
will be called after RSMRST is changed.
BUG=b:148688874
BRANCH=None
TEST=Enable CONFIG_* option, verify that callback is called once RSMRST
changes.
Change-Id: Ic6b6b4a0f23639e3fd4d9e69c95b3d94e44a2162
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2058693
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
-rw-r--r-- | include/board_config.h | 10 | ||||
-rw-r--r-- | include/config.h | 6 | ||||
-rw-r--r-- | power/intel_x86.c | 4 |
3 files changed, 20 insertions, 0 deletions
diff --git a/include/board_config.h b/include/board_config.h index 18f7d93fb6..6682d8f9f4 100644 --- a/include/board_config.h +++ b/include/board_config.h @@ -50,6 +50,16 @@ void board_config_post_gpio_init(void); void board_before_rsmrst(int rsmrst); #endif +#ifdef CONFIG_BOARD_HAS_AFTER_RSMRST +/** + * Configure board after RSMRST# state change + * + * Similar to board_before_rsmrst, except this is called after passing RSMRST# + * to the AP. + */ +void board_after_rsmrst(int rsmrst); +#endif + /** * Configure chip early in main(), just after board_config_pre_init(). * diff --git a/include/config.h b/include/config.h index 7560d7509d..e876b41bb3 100644 --- a/include/config.h +++ b/include/config.h @@ -635,6 +635,12 @@ #undef CONFIG_BOARD_HAS_RTC_RESET /* + * Call board_after_rsmrst(state) after passing RSMRST# to the AP. This is for + * board workarounds that are required just after RSMRST is passed to the AP. + */ +#undef CONFIG_BOARD_HAS_AFTER_RSMRST + +/* * Call board_before_rsmrst(state) before passing RSMRST# to the AP. * This is for board workarounds that are required after rails are up * but before the AP is out of reset. diff --git a/power/intel_x86.c b/power/intel_x86.c index 334a9367ca..89bc477640 100644 --- a/power/intel_x86.c +++ b/power/intel_x86.c @@ -628,6 +628,10 @@ void common_intel_x86_handle_rsmrst(enum power_state state) gpio_set_level(GPIO_PCH_RSMRST_L, rsmrst_in); CPRINTS("Pass through GPIO_RSMRST_L_PGOOD: %d", rsmrst_in); + +#ifdef CONFIG_BOARD_HAS_AFTER_RSMRST + board_after_rsmrst(rsmrst_in); +#endif } #ifdef CONFIG_POWER_TRACK_HOST_SLEEP_STATE |