From 77e13997d33ce8011f711c2001f82113320511fa Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Tue, 29 Nov 2016 17:43:04 -0600 Subject: romstage_handoff: remove code duplication MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The same pattern was being used throughout the code base for initializing the romstage handoff structure. Provide a helper function to initialize the structure with the S3 resume state then utilize it at all the existing call sites. Change-Id: I1e9d588ab6b9ace67757387dbb5963ae31ceb252 Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/17646 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki Reviewed-by: Furquan Shaikh --- src/northbridge/intel/sandybridge/early_init.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/northbridge/intel/sandybridge') diff --git a/src/northbridge/intel/sandybridge/early_init.c b/src/northbridge/intel/sandybridge/early_init.c index ef97a1af84..16ea29da67 100644 --- a/src/northbridge/intel/sandybridge/early_init.c +++ b/src/northbridge/intel/sandybridge/early_init.c @@ -227,13 +227,7 @@ void sandybridge_early_initialization(int chipset_type) void northbridge_romstage_finalize(int s3resume) { - struct romstage_handoff *handoff; - MCHBAR16(SSKPD) = 0xCAFE; - handoff = romstage_handoff_find_or_add(); - if (handoff != NULL) - handoff->s3_resume = s3resume; - else - printk(BIOS_DEBUG, "Romstage handoff structure not added!\n"); + romstage_handoff_init(s3resume); } -- cgit v1.2.3