mb/google/fatcat: Conditionally check for barrel charger

The barrel charger check in `baseboard_devtree_update` was
unconditional, increasing boot time on platforms without it.

This commit conditions the check on `CONFIG(BOARD_GOOGLE_MODEL_FATCAT)`,
making it specific to the fatcat board.

This avoids unnecessary delay on platforms like francka and felino.

BUG=b:328770565
TEST=Boot time reduced by 56ms.

Change-Id: Id7a26b634a1a310f714fbf4b4a2accd75665bc28
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87064
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Pranava Y N <pranavayn@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jayvik Desai <jayvik@google.com>
This commit is contained in:
Subrata Banik 2025-04-01 19:14:20 +05:30
commit 275beb93db

View file

@ -53,7 +53,7 @@ const struct cpu_tdp_power_limits power_optimized_limits[] = {
void baseboard_devtree_update(void)
{
/* Don't optimize the power limit if booting with barrel attached */
if (google_chromeec_is_barrel_charger_present())
if (CONFIG(BOARD_GOOGLE_MODEL_FATCAT) && google_chromeec_is_barrel_charger_present())
return;
if (!google_chromeec_is_battery_present())