ec/google/chromeec: Implement early power off
This commit implements the `google_chromeec_do_early_poweroff` function for the Chrome EC. This allows the system to power off before memory initialization by triggering an EC reset with EC_REBOOT_COLD_AP_OFF. BUG=b:339673254 TEST=Able to build and boot google/brox. Change-Id: Ia53469feb2a020b38a5414728159b09c86c7e32d Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/86337 Reviewed-by: Karthik Ramasubramanian <kramasub@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Caveh Jalali <caveh@chromium.org>
This commit is contained in:
parent
825ad863b5
commit
46f38d05d6
2 changed files with 15 additions and 0 deletions
|
|
@ -8,6 +8,7 @@
|
|||
#include <device/device.h>
|
||||
#include <device/path.h>
|
||||
#include <elog.h>
|
||||
#include <halt.h>
|
||||
#include <rtc.h>
|
||||
#include <security/vboot/vboot_common.h>
|
||||
#include <stdlib.h>
|
||||
|
|
@ -1669,3 +1670,9 @@ bool google_chromeec_is_battery_present(void)
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
void google_chromeec_do_early_poweroff(void)
|
||||
{
|
||||
google_chromeec_reboot(EC_REBOOT_COLD_AP_OFF, 0);
|
||||
halt();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -471,6 +471,14 @@ bool google_chromeec_is_below_critical_threshold(void);
|
|||
*/
|
||||
bool google_chromeec_is_battery_present(void);
|
||||
|
||||
/*
|
||||
* Performs early power off.
|
||||
*
|
||||
* This function handles the necessary steps to initiate an early power off
|
||||
* sequence.
|
||||
*/
|
||||
void google_chromeec_do_early_poweroff(void);
|
||||
|
||||
/**
|
||||
* Determine if the UCSI stack is currently active.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue