mb/google/fatcat: Move battery LED logic to platform hook
This patch moves the ChromeEC battery-low LED signaling from the Panther Lake SoC romstage code to the Fatcat mainboard-specific romstage. By utilizing the platform_romstage_pre_mem() hook, we remove Google- specific EC logic from the generic Intel SoC directory, adhering better to the separation of concerns between SoC and Mainboard code. - Implement platform_romstage_pre_mem() in google/fatcat. - Remove redundant EC include and LED logic from Panther Lake SoC. Change-Id: I09f7dd516f1a98cf99313db379cfbef5157c9869 Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/91000 Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Pranava Y N <pranavayn@google.com>
This commit is contained in:
parent
e13c79a31e
commit
9b663182d3
1 changed files with 9 additions and 0 deletions
|
|
@ -1,6 +1,8 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
#include <arch/romstage.h>
|
||||
#include <baseboard/variants.h>
|
||||
#include <ec/google/chromeec/ec.h>
|
||||
#include <fsp/api.h>
|
||||
#include <soc/romstage.h>
|
||||
#include <soc/soc_chip.h>
|
||||
|
|
@ -43,3 +45,10 @@ void mainboard_memory_init_params(FSPM_UPD *memupd)
|
|||
/* Override FSP-M UPD per board if required. */
|
||||
variant_update_soc_memory_init_params(memupd);
|
||||
}
|
||||
|
||||
void platform_romstage_pre_mem(void)
|
||||
{
|
||||
/* Set LED to Red to alert the user visually */
|
||||
if (CONFIG(EC_GOOGLE_CHROMEEC) && google_chromeec_is_critically_low_on_battery())
|
||||
google_chromeec_set_lightbar_rgb(0xff, 0xff, 0x00, 0x00);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue