diff options
-rw-r--r-- | baseboard/dedede/baseboard.c | 2 | ||||
-rw-r--r-- | include/board_config.h | 12 | ||||
-rw-r--r-- | include/config.h | 13 | ||||
-rw-r--r-- | power/intel_x86.c | 12 |
4 files changed, 15 insertions, 24 deletions
diff --git a/baseboard/dedede/baseboard.c b/baseboard/dedede/baseboard.c index 26e2a81b1b..00e0c297b7 100644 --- a/baseboard/dedede/baseboard.c +++ b/baseboard/dedede/baseboard.c @@ -22,7 +22,7 @@ const enum gpio_signal hibernate_wake_pins[] = {}; const int hibernate_wake_pins_used; -void board_after_rsmrst(int rsmrst) +__override void board_after_rsmrst(int rsmrst) { /* * b:148688874: If RSMRST# is de-asserted, enable the pull-up on diff --git a/include/board_config.h b/include/board_config.h index 6682d8f9f4..5b21be8236 100644 --- a/include/board_config.h +++ b/include/board_config.h @@ -34,7 +34,6 @@ void board_config_pre_init(void); void board_config_post_gpio_init(void); #endif -#ifdef CONFIG_BOARD_HAS_BEFORE_RSMRST /** * Configure board before RSMRST# state change * @@ -46,19 +45,20 @@ void board_config_post_gpio_init(void); * not get interrupts in time to handle workarounds. For x86 platforms and * boards which support RSMRST# passthrough this hook will allow the board * to apply workarounds despite the PMIC sequencing. + * + * The default implementation does nothing. */ -void board_before_rsmrst(int rsmrst); -#endif +__override_proto void board_before_rsmrst(int rsmrst); -#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. + * + * The default implementation does nothing. */ -void board_after_rsmrst(int rsmrst); -#endif +__override_proto void board_after_rsmrst(int rsmrst); /** * Configure chip early in main(), just after board_config_pre_init(). diff --git a/include/config.h b/include/config.h index 3729ce0f76..dc137bac87 100644 --- a/include/config.h +++ b/include/config.h @@ -635,19 +635,6 @@ #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. - */ -#undef CONFIG_BOARD_HAS_BEFORE_RSMRST - -/* * Call board_config_post_gpio_init() after GPIOs are initialized. See * include/board_config.h for more information. */ diff --git a/power/intel_x86.c b/power/intel_x86.c index 89bc477640..290b16c885 100644 --- a/power/intel_x86.c +++ b/power/intel_x86.c @@ -595,6 +595,14 @@ void intel_x86_rsmrst_signal_interrupt(enum gpio_signal signal) power_signal_interrupt(signal); } +__overridable void board_before_rsmrst(int rsmrst) +{ +} + +__overridable void board_after_rsmrst(int rsmrst) +{ +} + void common_intel_x86_handle_rsmrst(enum power_state state) { /* @@ -608,9 +616,7 @@ void common_intel_x86_handle_rsmrst(enum power_state state) if (rsmrst_in == rsmrst_out) return; -#ifdef CONFIG_BOARD_HAS_BEFORE_RSMRST board_before_rsmrst(rsmrst_in); -#endif #ifdef CONFIG_CHIPSET_APL_GLK /* Only passthrough RSMRST_L de-assertion on power up */ @@ -629,9 +635,7 @@ void common_intel_x86_handle_rsmrst(enum power_state state) 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 |