Re: [U-Boot] [PATCH v3 01/10] x86: Rename existing FSP code to fsp1

2019-10-02 Thread Bin Meng
On Wed, Sep 25, 2019 at 10:00 PM Simon Glass  wrote:
>
> 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 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v3: None
> Changes in v2:
> - Correct Intel FSP web link
>
>  arch/x86/Kconfig  | 25 ++-
>  arch/x86/cpu/baytrail/acpi.c  |  2 +-
>  arch/x86/cpu/baytrail/fsp_configs.c   |  2 +-
>  arch/x86/cpu/braswell/fsp_configs.c   |  2 +-
>  arch/x86/cpu/ivybridge/fsp_configs.c  |  2 +-
>  arch/x86/cpu/queensbay/fsp_configs.c  |  2 +-
>  arch/x86/cpu/queensbay/tnc.c  |  2 +-
>  arch/x86/include/asm/{fsp => fsp1}/fsp_api.h  |  0
>  .../include/asm/{fsp => fsp1}/fsp_azalia.h|  0
>  .../include/asm/{fsp => fsp1}/fsp_bootmode.h  |  0
>  arch/x86/include/asm/{fsp => fsp1}/fsp_ffs.h  |  0
>  arch/x86/include/asm/{fsp => fsp1}/fsp_fv.h   |  0
>  arch/x86/include/asm/{fsp => fsp1}/fsp_hob.h  |  0
>  .../asm/{fsp => fsp1}/fsp_infoheader.h|  0
>  .../include/asm/{fsp => fsp1}/fsp_support.h   |  0
>  .../x86/include/asm/{fsp => fsp1}/fsp_types.h |  0
>  arch/x86/include/asm/u-boot-x86.h |  2 +-
>  arch/x86/lib/Makefile |  3 ++-
>  arch/x86/lib/{fsp => fsp1}/Makefile   |  0
>  arch/x86/lib/{fsp => fsp1}/fsp_car.S  |  0
>  arch/x86/lib/{fsp => fsp1}/fsp_common.c   |  2 +-
>  arch/x86/lib/{fsp => fsp1}/fsp_dram.c |  2 +-
>  arch/x86/lib/{fsp => fsp1}/fsp_graphics.c |  2 +-
>  arch/x86/lib/{fsp => fsp1}/fsp_support.c  |  2 +-
>  .../som-db5800-som-6867/som-db5800-som-6867.c |  2 +-
>  board/intel/cherryhill/cherryhill.c   |  2 +-
>  cmd/x86/fsp.c |  2 +-
>  drivers/pci/pci-uclass.c  |  2 +-
>  28 files changed, 41 insertions(+), 17 deletions(-)
>  rename arch/x86/include/asm/{fsp => fsp1}/fsp_api.h (100%)
>  rename arch/x86/include/asm/{fsp => fsp1}/fsp_azalia.h (100%)
>  rename arch/x86/include/asm/{fsp => fsp1}/fsp_bootmode.h (100%)
>  rename arch/x86/include/asm/{fsp => fsp1}/fsp_ffs.h (100%)
>  rename arch/x86/include/asm/{fsp => fsp1}/fsp_fv.h (100%)
>  rename arch/x86/include/asm/{fsp => fsp1}/fsp_hob.h (100%)
>  rename arch/x86/include/asm/{fsp => fsp1}/fsp_infoheader.h (100%)
>  rename arch/x86/include/asm/{fsp => fsp1}/fsp_support.h (100%)
>  rename arch/x86/include/asm/{fsp => fsp1}/fsp_types.h (100%)
>  rename arch/x86/lib/{fsp => fsp1}/Makefile (100%)
>  rename arch/x86/lib/{fsp => fsp1}/fsp_car.S (100%)
>  rename arch/x86/lib/{fsp => fsp1}/fsp_common.c (99%)
>  rename arch/x86/lib/{fsp => fsp1}/fsp_dram.c (98%)
>  rename arch/x86/lib/{fsp => fsp1}/fsp_graphics.c (98%)
>  rename arch/x86/lib/{fsp => fsp1}/fsp_support.c (99%)
>

applied to u-boot-x86/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v3 01/10] x86: Rename existing FSP code to fsp1

2019-09-25 Thread Simon Glass
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 
Reviewed-by: Bin Meng 
---

Changes in v3: None
Changes in v2:
- Correct Intel FSP web link

 arch/x86/Kconfig  | 25 ++-
 arch/x86/cpu/baytrail/acpi.c  |  2 +-
 arch/x86/cpu/baytrail/fsp_configs.c   |  2 +-
 arch/x86/cpu/braswell/fsp_configs.c   |  2 +-
 arch/x86/cpu/ivybridge/fsp_configs.c  |  2 +-
 arch/x86/cpu/queensbay/fsp_configs.c  |  2 +-
 arch/x86/cpu/queensbay/tnc.c  |  2 +-
 arch/x86/include/asm/{fsp => fsp1}/fsp_api.h  |  0
 .../include/asm/{fsp => fsp1}/fsp_azalia.h|  0
 .../include/asm/{fsp => fsp1}/fsp_bootmode.h  |  0
 arch/x86/include/asm/{fsp => fsp1}/fsp_ffs.h  |  0
 arch/x86/include/asm/{fsp => fsp1}/fsp_fv.h   |  0
 arch/x86/include/asm/{fsp => fsp1}/fsp_hob.h  |  0
 .../asm/{fsp => fsp1}/fsp_infoheader.h|  0
 .../include/asm/{fsp => fsp1}/fsp_support.h   |  0
 .../x86/include/asm/{fsp => fsp1}/fsp_types.h |  0
 arch/x86/include/asm/u-boot-x86.h |  2 +-
 arch/x86/lib/Makefile |  3 ++-
 arch/x86/lib/{fsp => fsp1}/Makefile   |  0
 arch/x86/lib/{fsp => fsp1}/fsp_car.S  |  0
 arch/x86/lib/{fsp => fsp1}/fsp_common.c   |  2 +-
 arch/x86/lib/{fsp => fsp1}/fsp_dram.c |  2 +-
 arch/x86/lib/{fsp => fsp1}/fsp_graphics.c |  2 +-
 arch/x86/lib/{fsp => fsp1}/fsp_support.c  |  2 +-
 .../som-db5800-som-6867/som-db5800-som-6867.c |  2 +-
 board/intel/cherryhill/cherryhill.c   |  2 +-
 cmd/x86/fsp.c |  2 +-
 drivers/pci/pci-uclass.c  |  2 +-
 28 files changed, 41 insertions(+), 17 deletions(-)
 rename arch/x86/include/asm/{fsp => fsp1}/fsp_api.h (100%)
 rename arch/x86/include/asm/{fsp => fsp1}/fsp_azalia.h (100%)
 rename arch/x86/include/asm/{fsp => fsp1}/fsp_bootmode.h (100%)
 rename arch/x86/include/asm/{fsp => fsp1}/fsp_ffs.h (100%)
 rename arch/x86/include/asm/{fsp => fsp1}/fsp_fv.h (100%)
 rename arch/x86/include/asm/{fsp => fsp1}/fsp_hob.h (100%)
 rename arch/x86/include/asm/{fsp => fsp1}/fsp_infoheader.h (100%)
 rename arch/x86/include/asm/{fsp => fsp1}/fsp_support.h (100%)
 rename arch/x86/include/asm/{fsp => fsp1}/fsp_types.h (100%)
 rename arch/x86/lib/{fsp => fsp1}/Makefile (100%)
 rename arch/x86/lib/{fsp => fsp1}/fsp_car.S (100%)
 rename arch/x86/lib/{fsp => fsp1}/fsp_common.c (99%)
 rename arch/x86/lib/{fsp => fsp1}/fsp_dram.c (98%)
 rename arch/x86/lib/{fsp => fsp1}/fsp_graphics.c (98%)
 rename arch/x86/lib/{fsp => fsp1}/fsp_support.c (99%)

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