summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-09-25 08:00:11 -0600
committerBin Meng <bmeng.cn@gmail.com>2019-10-08 13:50:08 +0800
commit83311886151f80ef24d30f850baece07d08863cb (patch)
treef13bd9053d87780e0c1624b978f9224602e951d9
parent61ba1244b548463dbfb3c5285b6b22e7c772c5bd (diff)
x86: Rename existing FSP code to fsp1
Since there is now a new version of the FSP and it is incompatible with the existing version, move the code into an fsp1 directory. This will allow us to put FSP v2 code into an fsp2 directory. Add a Kconfig which defines which version is in use. Some of the code in this new fsp1/ directory is generic across both FSPv1 and FSPv2. Future patches will address this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
-rw-r--r--arch/x86/Kconfig25
-rw-r--r--arch/x86/cpu/baytrail/acpi.c2
-rw-r--r--arch/x86/cpu/baytrail/fsp_configs.c2
-rw-r--r--arch/x86/cpu/braswell/fsp_configs.c2
-rw-r--r--arch/x86/cpu/ivybridge/fsp_configs.c2
-rw-r--r--arch/x86/cpu/queensbay/fsp_configs.c2
-rw-r--r--arch/x86/cpu/queensbay/tnc.c2
-rw-r--r--arch/x86/include/asm/fsp1/fsp_api.h (renamed from arch/x86/include/asm/fsp/fsp_api.h)0
-rw-r--r--arch/x86/include/asm/fsp1/fsp_azalia.h (renamed from arch/x86/include/asm/fsp/fsp_azalia.h)0
-rw-r--r--arch/x86/include/asm/fsp1/fsp_bootmode.h (renamed from arch/x86/include/asm/fsp/fsp_bootmode.h)0
-rw-r--r--arch/x86/include/asm/fsp1/fsp_ffs.h (renamed from arch/x86/include/asm/fsp/fsp_ffs.h)0
-rw-r--r--arch/x86/include/asm/fsp1/fsp_fv.h (renamed from arch/x86/include/asm/fsp/fsp_fv.h)0
-rw-r--r--arch/x86/include/asm/fsp1/fsp_hob.h (renamed from arch/x86/include/asm/fsp/fsp_hob.h)0
-rw-r--r--arch/x86/include/asm/fsp1/fsp_infoheader.h (renamed from arch/x86/include/asm/fsp/fsp_infoheader.h)0
-rw-r--r--arch/x86/include/asm/fsp1/fsp_support.h (renamed from arch/x86/include/asm/fsp/fsp_support.h)0
-rw-r--r--arch/x86/include/asm/fsp1/fsp_types.h (renamed from arch/x86/include/asm/fsp/fsp_types.h)0
-rw-r--r--arch/x86/include/asm/u-boot-x86.h2
-rw-r--r--arch/x86/lib/Makefile3
-rw-r--r--arch/x86/lib/fsp1/Makefile (renamed from arch/x86/lib/fsp/Makefile)0
-rw-r--r--arch/x86/lib/fsp1/fsp_car.S (renamed from arch/x86/lib/fsp/fsp_car.S)0
-rw-r--r--arch/x86/lib/fsp1/fsp_common.c (renamed from arch/x86/lib/fsp/fsp_common.c)2
-rw-r--r--arch/x86/lib/fsp1/fsp_dram.c (renamed from arch/x86/lib/fsp/fsp_dram.c)2
-rw-r--r--arch/x86/lib/fsp1/fsp_graphics.c (renamed from arch/x86/lib/fsp/fsp_graphics.c)2
-rw-r--r--arch/x86/lib/fsp1/fsp_support.c (renamed from arch/x86/lib/fsp/fsp_support.c)2
-rw-r--r--board/advantech/som-db5800-som-6867/som-db5800-som-6867.c2
-rw-r--r--board/intel/cherryhill/cherryhill.c2
-rw-r--r--cmd/x86/fsp.c2
-rw-r--r--drivers/pci/pci-uclass.c2
28 files changed, 41 insertions, 17 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 218e817cf3f..314f8def7a4 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -364,6 +364,29 @@ config HAVE_FSP
Note: Without this binary U-Boot will not be able to set up its
SDRAM so will not boot.
+choice
+ prompt "FSP version"
+ depends on HAVE_FSP
+ default FSP_VERSION1
+ help
+ Selects the FSP version to use. Intel has published several versions
+ of the FSP External Architecture Specification and this allows
+ selection of the version number used by a particular SoC.
+
+config FSP_VERSION1
+ bool "FSP version 1.x"
+ help
+ This covers versions 1.0 and 1.1a. See here for details:
+ https://github.com/IntelFsp/fsp/wiki
+
+config FSP_VERSION2
+ bool "FSP version 2.x"
+ help
+ This covers versions 2.0 and 2.1. See here for details:
+ https://github.com/IntelFsp/fsp/wiki
+
+endchoice
+
config FSP_FILE
string "Firmware Support Package binary filename"
depends on HAVE_FSP
@@ -429,7 +452,7 @@ config ENABLE_MRC_CACHE
For platforms that use Intel FSP for the memory initialization,
please check FSP output HOB via U-Boot command 'fsp hob' to see
- if there is FSP_NON_VOLATILE_STORAGE_HOB_GUID (asm/fsp/fsp_hob.h).
+ if there is FSP_NON_VOLATILE_STORAGE_HOB_GUID (asm/fsp1/fsp_hob.h).
If such GUID does not exist, MRC cache is not available on such
platform (eg: Intel Queensbay), which means selecting this option
here does not make any difference.
diff --git a/arch/x86/cpu/baytrail/acpi.c b/arch/x86/cpu/baytrail/acpi.c
index 445e4ba2d7f..1e3829a433c 100644
--- a/arch/x86/cpu/baytrail/acpi.c
+++ b/arch/x86/cpu/baytrail/acpi.c
@@ -167,7 +167,7 @@ void acpi_create_gnvs(struct acpi_global_nvs *gnvs)
* and PMC_BASE_ADDRESS are accessed, so we need make sure the base addresses
* of these two blocks are programmed by either U-Boot or FSP.
*
- * It has been verified that 1st phase API (see arch/x86/lib/fsp/fsp_car.S)
+ * It has been verified that 1st phase API (see arch/x86/lib/fsp1/fsp_car.S)
* on Intel BayTrail SoC already initializes these two base addresses so
* we are safe to access these registers here.
*/
diff --git a/arch/x86/cpu/baytrail/fsp_configs.c b/arch/x86/cpu/baytrail/fsp_configs.c
index cefd26299a4..5b5d66aa5e9 100644
--- a/arch/x86/cpu/baytrail/fsp_configs.c
+++ b/arch/x86/cpu/baytrail/fsp_configs.c
@@ -7,7 +7,7 @@
#include <common.h>
#include <fdtdec.h>
-#include <asm/fsp/fsp_support.h>
+#include <asm/fsp1/fsp_support.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/braswell/fsp_configs.c b/arch/x86/cpu/braswell/fsp_configs.c
index 7fe6fa7995a..607e333f21c 100644
--- a/arch/x86/cpu/braswell/fsp_configs.c
+++ b/arch/x86/cpu/braswell/fsp_configs.c
@@ -5,7 +5,7 @@
#include <common.h>
#include <fdtdec.h>
-#include <asm/fsp/fsp_support.h>
+#include <asm/fsp1/fsp_support.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/ivybridge/fsp_configs.c b/arch/x86/cpu/ivybridge/fsp_configs.c
index 2fd06b3bed7..773c2b2a0ae 100644
--- a/arch/x86/cpu/ivybridge/fsp_configs.c
+++ b/arch/x86/cpu/ivybridge/fsp_configs.c
@@ -5,7 +5,7 @@
#include <common.h>
#include <fdtdec.h>
-#include <asm/fsp/fsp_support.h>
+#include <asm/fsp1/fsp_support.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/queensbay/fsp_configs.c b/arch/x86/cpu/queensbay/fsp_configs.c
index c4d117783cb..0dd1901e07b 100644
--- a/arch/x86/cpu/queensbay/fsp_configs.c
+++ b/arch/x86/cpu/queensbay/fsp_configs.c
@@ -5,7 +5,7 @@
*/
#include <common.h>
-#include <asm/fsp/fsp_support.h>
+#include <asm/fsp1/fsp_support.h>
void update_fsp_configs(struct fsp_config_data *config,
struct fspinit_rtbuf *rt_buf)
diff --git a/arch/x86/cpu/queensbay/tnc.c b/arch/x86/cpu/queensbay/tnc.c
index 76556fc7f79..66737e655bb 100644
--- a/arch/x86/cpu/queensbay/tnc.c
+++ b/arch/x86/cpu/queensbay/tnc.c
@@ -12,7 +12,7 @@
#include <asm/post.h>
#include <asm/arch/device.h>
#include <asm/arch/tnc.h>
-#include <asm/fsp/fsp_support.h>
+#include <asm/fsp1/fsp_support.h>
#include <asm/processor.h>
static int __maybe_unused disable_igd(void)
diff --git a/arch/x86/include/asm/fsp/fsp_api.h b/arch/x86/include/asm/fsp1/fsp_api.h
index f2d70799f33..f2d70799f33 100644
--- a/arch/x86/include/asm/fsp/fsp_api.h
+++ b/arch/x86/include/asm/fsp1/fsp_api.h
diff --git a/arch/x86/include/asm/fsp/fsp_azalia.h b/arch/x86/include/asm/fsp1/fsp_azalia.h
index e59180bdae2..e59180bdae2 100644
--- a/arch/x86/include/asm/fsp/fsp_azalia.h
+++ b/arch/x86/include/asm/fsp1/fsp_azalia.h
diff --git a/arch/x86/include/asm/fsp/fsp_bootmode.h b/arch/x86/include/asm/fsp1/fsp_bootmode.h
index bc96ec308cb..bc96ec308cb 100644
--- a/arch/x86/include/asm/fsp/fsp_bootmode.h
+++ b/arch/x86/include/asm/fsp1/fsp_bootmode.h
diff --git a/arch/x86/include/asm/fsp/fsp_ffs.h b/arch/x86/include/asm/fsp1/fsp_ffs.h
index b7558e5a17f..b7558e5a17f 100644
--- a/arch/x86/include/asm/fsp/fsp_ffs.h
+++ b/arch/x86/include/asm/fsp1/fsp_ffs.h
diff --git a/arch/x86/include/asm/fsp/fsp_fv.h b/arch/x86/include/asm/fsp1/fsp_fv.h
index 511dfb78b81..511dfb78b81 100644
--- a/arch/x86/include/asm/fsp/fsp_fv.h
+++ b/arch/x86/include/asm/fsp1/fsp_fv.h
diff --git a/arch/x86/include/asm/fsp/fsp_hob.h b/arch/x86/include/asm/fsp1/fsp_hob.h
index 3bb79c4b67a..3bb79c4b67a 100644
--- a/arch/x86/include/asm/fsp/fsp_hob.h
+++ b/arch/x86/include/asm/fsp1/fsp_hob.h
diff --git a/arch/x86/include/asm/fsp/fsp_infoheader.h b/arch/x86/include/asm/fsp1/fsp_infoheader.h
index 86f78014b7b..86f78014b7b 100644
--- a/arch/x86/include/asm/fsp/fsp_infoheader.h
+++ b/arch/x86/include/asm/fsp1/fsp_infoheader.h
diff --git a/arch/x86/include/asm/fsp/fsp_support.h b/arch/x86/include/asm/fsp1/fsp_support.h
index 7b92392a277..7b92392a277 100644
--- a/arch/x86/include/asm/fsp/fsp_support.h
+++ b/arch/x86/include/asm/fsp1/fsp_support.h
diff --git a/arch/x86/include/asm/fsp/fsp_types.h b/arch/x86/include/asm/fsp1/fsp_types.h
index 3d5b17ecf11..3d5b17ecf11 100644
--- a/arch/x86/include/asm/fsp/fsp_types.h
+++ b/arch/x86/include/asm/fsp1/fsp_types.h
diff --git a/arch/x86/include/asm/u-boot-x86.h b/arch/x86/include/asm/u-boot-x86.h
index c252192bf41..2466ad2ad30 100644
--- a/arch/x86/include/asm/u-boot-x86.h
+++ b/arch/x86/include/asm/u-boot-x86.h
@@ -74,7 +74,7 @@ u32 isa_map_rom(u32 bus_addr, int size);
/* arch/x86/lib/... */
int video_bios_init(void);
-/* arch/x86/lib/fsp/... */
+/* arch/x86/lib/fsp1,2/... */
/**
* fsp_save_s3_stack() - save stack address to CMOS for next S3 boot
diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile
index 906be5eab98..a8c7448ee45 100644
--- a/arch/x86/lib/Makefile
+++ b/arch/x86/lib/Makefile
@@ -43,7 +43,8 @@ ifndef CONFIG_SPL_BUILD
obj-$(CONFIG_CMD_ZBOOT) += zimage.o
endif
obj-$(CONFIG_USE_HOB) += hob.o
-obj-$(CONFIG_HAVE_FSP) += fsp/
+obj-$(CONFIG_FSP_VERSION1) += fsp1/
+obj-$(CONFIG_FSP_VERSION2) += fsp2/
ifdef CONFIG_SPL_BUILD
ifdef CONFIG_TPL_BUILD
diff --git a/arch/x86/lib/fsp/Makefile b/arch/x86/lib/fsp1/Makefile
index 870de71bd71..870de71bd71 100644
--- a/arch/x86/lib/fsp/Makefile
+++ b/arch/x86/lib/fsp1/Makefile
diff --git a/arch/x86/lib/fsp/fsp_car.S b/arch/x86/lib/fsp1/fsp_car.S
index 8c54cea3db4..8c54cea3db4 100644
--- a/arch/x86/lib/fsp/fsp_car.S
+++ b/arch/x86/lib/fsp1/fsp_car.S
diff --git a/arch/x86/lib/fsp/fsp_common.c b/arch/x86/lib/fsp1/fsp_common.c
index ed0827c6e92..591eef7b813 100644
--- a/arch/x86/lib/fsp/fsp_common.c
+++ b/arch/x86/lib/fsp1/fsp_common.c
@@ -14,7 +14,7 @@
#include <asm/mrccache.h>
#include <asm/post.h>
#include <asm/processor.h>
-#include <asm/fsp/fsp_support.h>
+#include <asm/fsp1/fsp_support.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/lib/fsp/fsp_dram.c b/arch/x86/lib/fsp1/fsp_dram.c
index 3a23b70410b..3bf65b495ca 100644
--- a/arch/x86/lib/fsp/fsp_dram.c
+++ b/arch/x86/lib/fsp1/fsp_dram.c
@@ -4,7 +4,7 @@
*/
#include <common.h>
-#include <asm/fsp/fsp_support.h>
+#include <asm/fsp1/fsp_support.h>
#include <asm/e820.h>
#include <asm/mrccache.h>
#include <asm/post.h>
diff --git a/arch/x86/lib/fsp/fsp_graphics.c b/arch/x86/lib/fsp1/fsp_graphics.c
index 91d2d085572..52e71334f95 100644
--- a/arch/x86/lib/fsp/fsp_graphics.c
+++ b/arch/x86/lib/fsp1/fsp_graphics.c
@@ -7,7 +7,7 @@
#include <dm.h>
#include <vbe.h>
#include <video.h>
-#include <asm/fsp/fsp_support.h>
+#include <asm/fsp1/fsp_support.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/lib/fsp/fsp_support.c b/arch/x86/lib/fsp1/fsp_support.c
index 0eaa9b232b1..019a42f53fe 100644
--- a/arch/x86/lib/fsp/fsp_support.c
+++ b/arch/x86/lib/fsp1/fsp_support.c
@@ -5,7 +5,7 @@
*/
#include <common.h>
-#include <asm/fsp/fsp_support.h>
+#include <asm/fsp1/fsp_support.h>
#include <asm/post.h>
struct fsp_header *__attribute__((optimize("O0"))) find_fsp_header(void)
diff --git a/board/advantech/som-db5800-som-6867/som-db5800-som-6867.c b/board/advantech/som-db5800-som-6867/som-db5800-som-6867.c
index ac12f303a3b..8f4c587371d 100644
--- a/board/advantech/som-db5800-som-6867/som-db5800-som-6867.c
+++ b/board/advantech/som-db5800-som-6867/som-db5800-som-6867.c
@@ -5,7 +5,7 @@
*/
#include <common.h>
-#include <asm/fsp/fsp_support.h>
+#include <asm/fsp1/fsp_support.h>
/* ALC262 Verb Table - 10EC0262 */
static const u32 verb_table_data13[] = {
diff --git a/board/intel/cherryhill/cherryhill.c b/board/intel/cherryhill/cherryhill.c
index 695af6bb7ec..c037d5b14cd 100644
--- a/board/intel/cherryhill/cherryhill.c
+++ b/board/intel/cherryhill/cherryhill.c
@@ -5,7 +5,7 @@
#include <common.h>
#include <asm/arch/gpio.h>
-#include <asm/fsp/fsp_support.h>
+#include <asm/fsp1/fsp_support.h>
static const struct gpio_family gpio_family[] = {
GPIO_FAMILY_CONF("SOUTHEAST_2_hshvfamily_2x3_rcomp_7_0", NA, 0,
diff --git a/cmd/x86/fsp.c b/cmd/x86/fsp.c
index efa183854b7..fb27624422c 100644
--- a/cmd/x86/fsp.c
+++ b/cmd/x86/fsp.c
@@ -5,7 +5,7 @@
#include <common.h>
#include <command.h>
-#include <asm/fsp/fsp_support.h>
+#include <asm/fsp1/fsp_support.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
index ab3e1310eb5..b73d0cd70a7 100644
--- a/drivers/pci/pci-uclass.c
+++ b/drivers/pci/pci-uclass.c
@@ -12,7 +12,7 @@
#include <dm/device-internal.h>
#include <dm/lists.h>
#if defined(CONFIG_X86) && defined(CONFIG_HAVE_FSP)
-#include <asm/fsp/fsp_support.h>
+#include <asm/fsp1/fsp_support.h>
#endif
#include "pci_internal.h"