From d0bc92df73d7653ed8b6c76baf3a39c7f8f37173 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Sun, 10 Jan 2021 00:23:58 +0200 Subject: intel/fsp1_1: Declare fsp_load() as static MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The function has only one local call-site. Change-Id: I623953796e6cd3a8e5b4f72293d953b61f14a5a1 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/49999 Reviewed-by: Arthur Heymans Reviewed-by: Angel Pons Tested-by: build bot (Jenkins) --- src/drivers/intel/fsp1_1/include/fsp/ramstage.h | 6 ------ src/drivers/intel/fsp1_1/ramstage.c | 8 +------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/drivers/intel/fsp1_1/include/fsp/ramstage.h b/src/drivers/intel/fsp1_1/include/fsp/ramstage.h index 0a6295edc5..f925088e00 100644 --- a/src/drivers/intel/fsp1_1/include/fsp/ramstage.h +++ b/src/drivers/intel/fsp1_1/include/fsp/ramstage.h @@ -6,12 +6,6 @@ #include #include -/* - * Load FSP from stage cache or CBFS. This allows SoCs to load FSP separately - * from calling silicon init. It might be required in cases where stage cache is - * no longer available by the point SoC calls into silicon init. - */ -void fsp_load(void); /* Perform Intel silicon init. */ void intel_silicon_init(void); void fsp_run_silicon_init(FSP_INFO_HEADER *fsp_info_header, int is_s3_wakeup); diff --git a/src/drivers/intel/fsp1_1/ramstage.c b/src/drivers/intel/fsp1_1/ramstage.c index eb226dbb65..5fff60ac1a 100644 --- a/src/drivers/intel/fsp1_1/ramstage.c +++ b/src/drivers/intel/fsp1_1/ramstage.c @@ -173,15 +173,11 @@ static int fsp_find_and_relocate(struct prog *fsp) return 0; } -void fsp_load(void) +static void fsp_load(void) { - static int load_done; struct prog fsp = PROG_INIT(PROG_REFCODE, "fsp.bin"); int is_s3_wakeup = acpi_is_wakeup_s3(); - if (load_done) - return; - if (is_s3_wakeup && !CONFIG(NO_STAGE_CACHE)) { printk(BIOS_DEBUG, "FSP: Loading binary from cache\n"); stage_cache_load_stage(STAGE_REFCODE, &fsp); @@ -192,8 +188,6 @@ void fsp_load(void) /* FSP_INFO_HEADER is set as the program entry. */ fsp_update_fih(prog_entry(&fsp)); - - load_done = 1; } void intel_silicon_init(void) -- cgit v1.2.3