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>
This commit is contained in:
Subrata Banik 2023-04-19 20:48:01 +05:30 committed by Felix Held
parent b2f5a22c4a
commit db7b35a9c9
1 changed files with 3 additions and 3 deletions

View File

@ -1211,10 +1211,10 @@ enum cb_err cse_get_fpt_partition_info(enum fpt_partition_id id, struct fw_versi
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);