drivers/intel/fsp2_0: Simplify check for CONFIG_SAVE_MRC_AFTER_FSPS

This uses a simpler form of #if to check if CONFIG_SAVE_MRC_AFTER_FSPS
is enabled, referencing the Kconfig variable only once and defaulting
to the original behavior if not.

Change-Id: I4711c1474d9a3a5c685dd31561619c568fab075c
Signed-off-by: David Hendricks <david.hendricks@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/72587
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
David Hendricks 2023-01-29 17:56:23 -08:00 committed by Elyes Haouas
parent 9aebc19182
commit 69b8194946
1 changed files with 3 additions and 3 deletions

View File

@ -43,8 +43,8 @@ static void save_mrc_data(void *unused)
* Should be done before ramstage_cse_fw_sync() to avoid traning memory twice on
* a cold boot after a full firmware update.
*/
#if !CONFIG(SAVE_MRC_AFTER_FSPS)
BOOT_STATE_INIT_ENTRY(BS_PRE_DEVICE, BS_ON_ENTRY, save_mrc_data, NULL);
#elif CONFIG(SAVE_MRC_AFTER_FSPS)
#if CONFIG(SAVE_MRC_AFTER_FSPS)
BOOT_STATE_INIT_ENTRY(BS_DEV_INIT_CHIPS, BS_ON_EXIT, save_mrc_data, NULL);
#else
BOOT_STATE_INIT_ENTRY(BS_PRE_DEVICE, BS_ON_ENTRY, save_mrc_data, NULL);
#endif