diff options
Diffstat (limited to 'arch/x86/lib/fsp2')
| -rw-r--r-- | arch/x86/lib/fsp2/fsp_dram.c | 12 | ||||
| -rw-r--r-- | arch/x86/lib/fsp2/fsp_init.c | 7 | ||||
| -rw-r--r-- | arch/x86/lib/fsp2/fsp_meminit.c | 6 | ||||
| -rw-r--r-- | arch/x86/lib/fsp2/fsp_silicon_init.c | 6 | ||||
| -rw-r--r-- | arch/x86/lib/fsp2/fsp_support.c | 1 | 
5 files changed, 25 insertions, 7 deletions
| diff --git a/arch/x86/lib/fsp2/fsp_dram.c b/arch/x86/lib/fsp2/fsp_dram.c index c8f2c09b6a7..1c82b818313 100644 --- a/arch/x86/lib/fsp2/fsp_dram.c +++ b/arch/x86/lib/fsp2/fsp_dram.c @@ -6,17 +6,26 @@  #include <common.h>  #include <handoff.h> +#include <init.h> +#include <log.h>  #include <spl.h>  #include <acpi/acpi_s3.h>  #include <asm/arch/cpu.h>  #include <asm/fsp/fsp_support.h>  #include <asm/fsp2/fsp_api.h>  #include <asm/fsp2/fsp_internal.h> +#include <linux/sizes.h>  int dram_init(void)  {  	int ret; +	if (!ll_boot_init()) { +		/* Use a small and safe amount of 1GB */ +		gd->ram_size = SZ_1G; + +		return 0; +	}  	if (spl_phase() == PHASE_SPL) {  #ifdef CONFIG_HAVE_ACPI_RESUME  		bool s3wake = gd->arch.prev_sleep_state == ACPI_S3; @@ -68,6 +77,9 @@ int dram_init(void)  ulong board_get_usable_ram_top(ulong total_size)  { +	if (!ll_boot_init()) +		return gd->ram_size; +  #if CONFIG_IS_ENABLED(HANDOFF)  	struct spl_handoff *ho = gd->spl_handoff; diff --git a/arch/x86/lib/fsp2/fsp_init.c b/arch/x86/lib/fsp2/fsp_init.c index da9bd6b45cf..85cae54a0ca 100644 --- a/arch/x86/lib/fsp2/fsp_init.c +++ b/arch/x86/lib/fsp2/fsp_init.c @@ -6,9 +6,11 @@  #include <common.h>  #include <binman.h>  #include <binman_sym.h> +#include <bootstage.h>  #include <cbfs.h>  #include <dm.h>  #include <init.h> +#include <log.h>  #include <spi.h>  #include <spl.h>  #include <spi_flash.h> @@ -23,7 +25,7 @@ int arch_cpu_init_dm(void)  	int ret;  	/* Make sure pads are set up early in U-Boot */ -	if (spl_phase() != PHASE_BOARD_F) +	if (!ll_boot_init() || spl_phase() != PHASE_BOARD_F)  		return 0;  	/* Probe all pinctrl devices to set up the pads */ @@ -79,11 +81,10 @@ static int get_cbfs_fsp(enum fsp_type_t type, ulong map_base,  	 * 'COREBOOT' (CBFS, size 1814528, offset 2117632).  	 */  	ulong cbfs_base = 0x205000; -	ulong cbfs_size = 0x1bb000;  	struct cbfs_priv *cbfs;  	int ret; -	ret = cbfs_init_mem(map_base + cbfs_base, cbfs_size, &cbfs); +	ret = cbfs_init_mem(map_base + cbfs_base, &cbfs);  	if (ret)  		return ret;  	if (!ret) { diff --git a/arch/x86/lib/fsp2/fsp_meminit.c b/arch/x86/lib/fsp2/fsp_meminit.c index bf30c479899..1a758147b08 100644 --- a/arch/x86/lib/fsp2/fsp_meminit.c +++ b/arch/x86/lib/fsp2/fsp_meminit.c @@ -8,6 +8,8 @@  #include <common.h>  #include <binman.h> +#include <bootstage.h> +#include <log.h>  #include <asm/mrccache.h>  #include <asm/fsp/fsp_infoheader.h>  #include <asm/fsp2/fsp_api.h> @@ -79,10 +81,10 @@ int fsp_memory_init(bool s3wake, bool use_spi_flash)  		return log_msg_ret("Could not setup config", ret);  	debug("SDRAM init..."); -	bootstage_start(BOOTSTATE_ID_ACCUM_FSP_M, "fsp-m"); +	bootstage_start(BOOTSTAGE_ID_ACCUM_FSP_M, "fsp-m");  	func = (fsp_memory_init_func)(hdr->img_base + hdr->fsp_mem_init);  	ret = func(&upd, &hob); -	bootstage_accum(BOOTSTATE_ID_ACCUM_FSP_M); +	bootstage_accum(BOOTSTAGE_ID_ACCUM_FSP_M);  	if (ret)  		return log_msg_ret("SDRAM init fail\n", ret); diff --git a/arch/x86/lib/fsp2/fsp_silicon_init.c b/arch/x86/lib/fsp2/fsp_silicon_init.c index d7ce43e1eb2..45c0c7d90b9 100644 --- a/arch/x86/lib/fsp2/fsp_silicon_init.c +++ b/arch/x86/lib/fsp2/fsp_silicon_init.c @@ -10,7 +10,9 @@  #include <common.h>  #include <binman.h> +#include <bootstage.h>  #include <dm.h> +#include <log.h>  #include <asm/arch/fsp/fsp_configs.h>  #include <asm/arch/fsp/fsp_s_upd.h>  #include <asm/fsp/fsp_infoheader.h> @@ -42,10 +44,10 @@ int fsp_silicon_init(bool s3wake, bool use_spi_flash)  	if (ret)  		return log_msg_ret("Could not setup config", ret);  	log_debug("Silicon init..."); -	bootstage_start(BOOTSTATE_ID_ACCUM_FSP_S, "fsp-s"); +	bootstage_start(BOOTSTAGE_ID_ACCUM_FSP_S, "fsp-s");  	func = (fsp_silicon_init_func)(hdr->img_base + hdr->fsp_silicon_init);  	ret = func(&upd); -	bootstage_accum(BOOTSTATE_ID_ACCUM_FSP_S); +	bootstage_accum(BOOTSTAGE_ID_ACCUM_FSP_S);  	if (ret)  		return log_msg_ret("Silicon init fail\n", ret);  	log_debug("done\n"); diff --git a/arch/x86/lib/fsp2/fsp_support.c b/arch/x86/lib/fsp2/fsp_support.c index 0a04b443f7e..3f2ca840dc9 100644 --- a/arch/x86/lib/fsp2/fsp_support.c +++ b/arch/x86/lib/fsp2/fsp_support.c @@ -6,6 +6,7 @@  #include <common.h>  #include <dm.h> +#include <log.h>  #include <spi_flash.h>  #include <asm/fsp/fsp_support.h>  #include <asm/fsp2/fsp_internal.h> | 
