From b50c219557d0ea99571aaf2f939e1c5c6c99ecfb Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Tue, 24 Feb 2026 12:42:46 +0530 Subject: [PATCH] soc/intel: Use centralized emergency battery shutdown hook Migrate the low-battery power-off sequence in Intel common reset logic to use platform_handle_emergency_low_battery(). This ensures that all Intel-based boards benefit from the unified ChromeOS battery alert flow (LED notification and ELOG recording) without duplicating the logic in the SOC layer. BUG=none BRANCH=none TEST=Verified that low-battery shutdown on Intel platforms still correctly logs ELOG and triggers visual alerts via the new hook. Change-Id: I37c15a1f7dd5acee10389c0521e8c9b2f2d90d42 Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/c/coreboot/+/91411 Tested-by: build bot (Jenkins) Reviewed-by: Kapil Porwal --- src/soc/intel/common/reset.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/soc/intel/common/reset.c b/src/soc/intel/common/reset.c index 40cea6bccc..14a32c1697 100644 --- a/src/soc/intel/common/reset.c +++ b/src/soc/intel/common/reset.c @@ -1,10 +1,9 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include +#include #include #include -#include -#include #include #include @@ -26,10 +25,7 @@ void do_board_reset(void) void do_low_battery_poweroff(void) { - if (CONFIG(PLATFORM_HAS_LOW_BATTERY_INDICATOR)) { - elog_add_event_byte(ELOG_TYPE_LOW_BATTERY_INDICATOR, ELOG_FW_ISSUE_SHUTDOWN); - delay(CONFIG_PLATFORM_POST_RENDER_DELAY_SEC); - } + platform_handle_emergency_low_battery(); poweroff(); halt();