Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/74581 )
Change subject: soc/intel/cmn/cse: Refactor ramstage_cse_fw_sync() function ......................................................................
soc/intel/cmn/cse: Refactor ramstage_cse_fw_sync() function
This patch refactors sleep type check inside ramstage_cse_fw_sync() to avoid additional logic while performing cse_fw_sync() operation.
TEST=Able to build and boot google/marasov.
Signed-off-by: Subrata Banik subratabanik@google.com Change-Id: I7c7a91c81d51dbf6742e12c58a24b9f52fff5630 Reviewed-on: https://review.coreboot.org/c/coreboot/+/74581 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Arthur Heymans arthur@aheymans.xyz Reviewed-by: Kapil Porwal kapilporwal@google.com Reviewed-by: Kangheui Won khwon@chromium.org --- M src/soc/intel/common/block/cse/cse_lite.c 1 file changed, 23 insertions(+), 3 deletions(-)
Approvals: build bot (Jenkins): Verified Arthur Heymans: Looks good to me, approved Kangheui Won: Looks good to me, approved Kapil Porwal: Looks good to me, approved
diff --git a/src/soc/intel/common/block/cse/cse_lite.c b/src/soc/intel/common/block/cse/cse_lite.c index 4cc9e19..1e2a052 100644 --- a/src/soc/intel/common/block/cse/cse_lite.c +++ b/src/soc/intel/common/block/cse/cse_lite.c @@ -1211,10 +1211,10 @@
static void ramstage_cse_fw_sync(void *unused) { - bool s3wake; - s3wake = acpi_get_sleep_type() == ACPI_S3; + if (acpi_get_sleep_type() == ACPI_S3) + return;
- if (CONFIG(SOC_INTEL_CSE_LITE_SYNC_IN_RAMSTAGE) && !s3wake) { + if (CONFIG(SOC_INTEL_CSE_LITE_SYNC_IN_RAMSTAGE)) { timestamp_add_now(TS_CSE_FW_SYNC_START); cse_fw_sync(); timestamp_add_now(TS_CSE_FW_SYNC_END);