From 284a54775bf17f5192b164a4b9d09a06fcd747cd Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Fri, 3 Jul 2020 11:46:50 +0200 Subject: nb/intel/haswell: Drop unnecessary variable The "normalized" boot mode is only used in a single place, so there's no need to use a variable. Also, reword the associated comment, which seems to be unnecessarily vague: the hardcoded assumptions are inside the MRC. Change-Id: I260d10f231f5de765d2675416d7047717d391d8f Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/43092 Tested-by: build bot (Jenkins) Reviewed-by: Tristan Corrick --- src/cpu/intel/haswell/romstage.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/cpu/intel/haswell/romstage.c b/src/cpu/intel/haswell/romstage.c index 381d7bfcb5..7886de07ed 100644 --- a/src/cpu/intel/haswell/romstage.c +++ b/src/cpu/intel/haswell/romstage.c @@ -15,7 +15,6 @@ void romstage_common(const struct romstage_params *params) { - int boot_mode; int wake_from_s3; enable_lapic(); @@ -37,16 +36,14 @@ void romstage_common(const struct romstage_params *params) #endif } - /* There are hard coded assumptions of 2 meaning s3 wake. Normalize - * the users of the 2 literal here based off wake_from_s3. */ - boot_mode = wake_from_s3 ? 2 : 0; - /* Prepare USB controller early in S3 resume */ if (wake_from_s3) enable_usb_bar(); post_code(0x3a); - params->pei_data->boot_mode = boot_mode; + + /* MRC has hardcoded assumptions of 2 meaning S3 wake. Normalize it here. */ + params->pei_data->boot_mode = wake_from_s3 ? 2 : 0; timestamp_add_now(TS_BEFORE_INITRAM); -- cgit v1.2.3