Karthik Ramasubramanian has submitted this change. ( https://review.coreboot.org/c/coreboot/+/85002?usp=email )
Change subject: mb/google/brox: Reduce PL4 only for battery disconnected scenario ......................................................................
mb/google/brox: Reduce PL4 only for battery disconnected scenario
This patch reduces PL4 only for no battery condition i.e. when battery is disconnected or not physically present.
BUG=b:377305625 TEST=Build Brox and boot when the battery is disconnected
Change-Id: I59a1028ce9cd3a6cf98f865d9c085a64f391f201 Signed-off-by: Sowmya Aralguppe sowmya.aralguppe@intel.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/85002 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Karthik Ramasubramanian kramasub@google.com --- M src/mainboard/google/brox/romstage.c M src/mainboard/google/brox/variants/baseboard/brox/ramstage.c 2 files changed, 3 insertions(+), 5 deletions(-)
Approvals: Karthik Ramasubramanian: Looks good to me, approved build bot (Jenkins): Verified
diff --git a/src/mainboard/google/brox/romstage.c b/src/mainboard/google/brox/romstage.c index ced9184..19b99bb 100644 --- a/src/mainboard/google/brox/romstage.c +++ b/src/mainboard/google/brox/romstage.c @@ -21,8 +21,7 @@ size_t pads_num;
/* If battery is not present - Boot with maximum non-turbo frequency */ - if (CONFIG(EC_GOOGLE_CHROMEEC) && - !google_chromeec_is_battery_present_and_above_critical_threshold()) { + if (CONFIG(EC_GOOGLE_CHROMEEC) && !google_chromeec_is_battery_present()) { FSP_M_CONFIG *mem_cfg = &memupd->FspmConfig; mem_cfg->BootFrequency = MAX_NONTURBO_PERFORMANCE; printk(BIOS_DEBUG, "Boot Frequency is set to %u\n", mem_cfg->BootFrequency); diff --git a/src/mainboard/google/brox/variants/baseboard/brox/ramstage.c b/src/mainboard/google/brox/variants/baseboard/brox/ramstage.c index 80c8499..f079d7a 100644 --- a/src/mainboard/google/brox/variants/baseboard/brox/ramstage.c +++ b/src/mainboard/google/brox/variants/baseboard/brox/ramstage.c @@ -53,9 +53,8 @@ if (!config->tdp_pl4) return;
- /* limiting PL4 value for battery disconnected or below critical threshold */ - if (CONFIG_PL4_LIMIT_FOR_CRITICAL_BAT_BOOT && - (!google_chromeec_is_battery_present_and_above_critical_threshold())) + /* Limit PL4 when battery is disconnected */ + if (CONFIG_PL4_LIMIT_FOR_CRITICAL_BAT_BOOT && !google_chromeec_is_battery_present()) config->tdp_pl4 = CONFIG_PL4_LIMIT_FOR_CRITICAL_BAT_BOOT; else config->tdp_pl4 = DIV_ROUND_UP(limits[brox_idx].pl4_power, MILLIWATTS_TO_WATTS);