From 1021af4ded2d0961a4ba2ba89851719b098a98b6 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 27 Jan 2015 22:13:36 -0700 Subject: [PATCH] x86: Move common FSP code into a common location Signed-off-by: Simon Glass Reviewed-by: Bin Meng Tested-by: Bin Meng --- arch/x86/cpu/queensbay/Makefile | 2 +- arch/x86/cpu/queensbay/fsp_configs.c | 2 +- arch/x86/cpu/queensbay/tnc.c | 2 +- arch/x86/cpu/queensbay/tnc_dram.c | 2 +- arch/x86/cpu/queensbay/tnc_pci.c | 2 +- arch/x86/include/asm/{arch-queensbay => }/fsp/fsp_api.h | 0 .../include/asm/{arch-queensbay => }/fsp/fsp_bootmode.h | 0 arch/x86/include/asm/{arch-queensbay => }/fsp/fsp_ffs.h | 0 arch/x86/include/asm/{arch-queensbay => }/fsp/fsp_fv.h | 0 arch/x86/include/asm/{arch-queensbay => }/fsp/fsp_hob.h | 0 .../include/asm/{arch-queensbay => }/fsp/fsp_infoheader.h | 0 .../include/asm/{arch-queensbay => }/fsp/fsp_platform.h | 0 .../x86/include/asm/{arch-queensbay => }/fsp/fsp_support.h | 2 +- arch/x86/include/asm/{arch-queensbay => }/fsp/fsp_types.h | 0 arch/x86/lib/Makefile | 1 + arch/x86/lib/cmd_hob.c | 2 +- arch/x86/lib/fsp/Makefile | 7 +++++++ arch/x86/{cpu/queensbay => lib/fsp}/fsp_support.c | 2 +- 18 files changed, 16 insertions(+), 8 deletions(-) rename arch/x86/include/asm/{arch-queensbay => }/fsp/fsp_api.h (100%) rename arch/x86/include/asm/{arch-queensbay => }/fsp/fsp_bootmode.h (100%) rename arch/x86/include/asm/{arch-queensbay => }/fsp/fsp_ffs.h (100%) rename arch/x86/include/asm/{arch-queensbay => }/fsp/fsp_fv.h (100%) rename arch/x86/include/asm/{arch-queensbay => }/fsp/fsp_hob.h (100%) rename arch/x86/include/asm/{arch-queensbay => }/fsp/fsp_infoheader.h (100%) rename arch/x86/include/asm/{arch-queensbay => }/fsp/fsp_platform.h (100%) rename arch/x86/include/asm/{arch-queensbay => }/fsp/fsp_support.h (99%) rename arch/x86/include/asm/{arch-queensbay => }/fsp/fsp_types.h (100%) create mode 100644 arch/x86/lib/fsp/Makefile rename arch/x86/{cpu/queensbay => lib/fsp}/fsp_support.c (99%) diff --git a/arch/x86/cpu/queensbay/Makefile b/arch/x86/cpu/queensbay/Makefile index 2c2ec01ed2..b3e7d87956 100644 --- a/arch/x86/cpu/queensbay/Makefile +++ b/arch/x86/cpu/queensbay/Makefile @@ -5,5 +5,5 @@ # obj-y += tnc_car.o tnc_dram.o tnc.o topcliff.o -obj-y += fsp_configs.o fsp_support.o +obj-y += fsp_configs.o obj-$(CONFIG_PCI) += tnc_pci.o diff --git a/arch/x86/cpu/queensbay/fsp_configs.c b/arch/x86/cpu/queensbay/fsp_configs.c index af28e457f6..78bc966bbd 100644 --- a/arch/x86/cpu/queensbay/fsp_configs.c +++ b/arch/x86/cpu/queensbay/fsp_configs.c @@ -6,7 +6,7 @@ */ #include -#include +#include void update_fsp_upd(struct upd_region *fsp_upd) { diff --git a/arch/x86/cpu/queensbay/tnc.c b/arch/x86/cpu/queensbay/tnc.c index 8637cdca2d..f9b3bfaada 100644 --- a/arch/x86/cpu/queensbay/tnc.c +++ b/arch/x86/cpu/queensbay/tnc.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include static void unprotect_spi_flash(void) diff --git a/arch/x86/cpu/queensbay/tnc_dram.c b/arch/x86/cpu/queensbay/tnc_dram.c index df79a39dd8..4c0a7c82ca 100644 --- a/arch/x86/cpu/queensbay/tnc_dram.c +++ b/arch/x86/cpu/queensbay/tnc_dram.c @@ -5,7 +5,7 @@ */ #include -#include +#include #include #include diff --git a/arch/x86/cpu/queensbay/tnc_pci.c b/arch/x86/cpu/queensbay/tnc_pci.c index 39bff49c8d..9b0b725313 100644 --- a/arch/x86/cpu/queensbay/tnc_pci.c +++ b/arch/x86/cpu/queensbay/tnc_pci.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/x86/include/asm/arch-queensbay/fsp/fsp_api.h b/arch/x86/include/asm/fsp/fsp_api.h similarity index 100% rename from arch/x86/include/asm/arch-queensbay/fsp/fsp_api.h rename to arch/x86/include/asm/fsp/fsp_api.h diff --git a/arch/x86/include/asm/arch-queensbay/fsp/fsp_bootmode.h b/arch/x86/include/asm/fsp/fsp_bootmode.h similarity index 100% rename from arch/x86/include/asm/arch-queensbay/fsp/fsp_bootmode.h rename to arch/x86/include/asm/fsp/fsp_bootmode.h diff --git a/arch/x86/include/asm/arch-queensbay/fsp/fsp_ffs.h b/arch/x86/include/asm/fsp/fsp_ffs.h similarity index 100% rename from arch/x86/include/asm/arch-queensbay/fsp/fsp_ffs.h rename to arch/x86/include/asm/fsp/fsp_ffs.h diff --git a/arch/x86/include/asm/arch-queensbay/fsp/fsp_fv.h b/arch/x86/include/asm/fsp/fsp_fv.h similarity index 100% rename from arch/x86/include/asm/arch-queensbay/fsp/fsp_fv.h rename to arch/x86/include/asm/fsp/fsp_fv.h diff --git a/arch/x86/include/asm/arch-queensbay/fsp/fsp_hob.h b/arch/x86/include/asm/fsp/fsp_hob.h similarity index 100% rename from arch/x86/include/asm/arch-queensbay/fsp/fsp_hob.h rename to arch/x86/include/asm/fsp/fsp_hob.h diff --git a/arch/x86/include/asm/arch-queensbay/fsp/fsp_infoheader.h b/arch/x86/include/asm/fsp/fsp_infoheader.h similarity index 100% rename from arch/x86/include/asm/arch-queensbay/fsp/fsp_infoheader.h rename to arch/x86/include/asm/fsp/fsp_infoheader.h diff --git a/arch/x86/include/asm/arch-queensbay/fsp/fsp_platform.h b/arch/x86/include/asm/fsp/fsp_platform.h similarity index 100% rename from arch/x86/include/asm/arch-queensbay/fsp/fsp_platform.h rename to arch/x86/include/asm/fsp/fsp_platform.h diff --git a/arch/x86/include/asm/arch-queensbay/fsp/fsp_support.h b/arch/x86/include/asm/fsp/fsp_support.h similarity index 99% rename from arch/x86/include/asm/arch-queensbay/fsp/fsp_support.h rename to arch/x86/include/asm/fsp/fsp_support.h index ebdbd03435..6329cfea66 100644 --- a/arch/x86/include/asm/arch-queensbay/fsp/fsp_support.h +++ b/arch/x86/include/asm/fsp/fsp_support.h @@ -16,7 +16,7 @@ #include "fsp_platform.h" #include "fsp_infoheader.h" #include "fsp_bootmode.h" -#include "fsp_vpd.h" +#include struct shared_data { struct fsp_header *fsp_hdr; diff --git a/arch/x86/include/asm/arch-queensbay/fsp/fsp_types.h b/arch/x86/include/asm/fsp/fsp_types.h similarity index 100% rename from arch/x86/include/asm/arch-queensbay/fsp/fsp_types.h rename to arch/x86/include/asm/fsp/fsp_types.h diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile index 32d7b98fa6..c17f7f088b 100644 --- a/arch/x86/lib/Makefile +++ b/arch/x86/lib/Makefile @@ -25,6 +25,7 @@ obj-y += string.o obj-$(CONFIG_SYS_X86_TSC_TIMER) += tsc_timer.o obj-$(CONFIG_VIDEO_VGA) += video.o obj-$(CONFIG_CMD_ZBOOT) += zimage.o +obj-$(CONFIG_HAVE_FSP) += fsp/ extra-$(CONFIG_USE_PRIVATE_LIBGCC) := lib.a diff --git a/arch/x86/lib/cmd_hob.c b/arch/x86/lib/cmd_hob.c index a0ef037da1..915746a4f9 100644 --- a/arch/x86/lib/cmd_hob.c +++ b/arch/x86/lib/cmd_hob.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/x86/lib/fsp/Makefile b/arch/x86/lib/fsp/Makefile new file mode 100644 index 0000000000..1b9b0e279a --- /dev/null +++ b/arch/x86/lib/fsp/Makefile @@ -0,0 +1,7 @@ +# +# Copyright (C) 2015 Google, Inc +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += fsp_support.o diff --git a/arch/x86/cpu/queensbay/fsp_support.c b/arch/x86/lib/fsp/fsp_support.c similarity index 99% rename from arch/x86/cpu/queensbay/fsp_support.c rename to arch/x86/lib/fsp/fsp_support.c index aed3e2b300..f6ae85a8ba 100644 --- a/arch/x86/cpu/queensbay/fsp_support.c +++ b/arch/x86/lib/fsp/fsp_support.c @@ -6,7 +6,7 @@ */ #include -#include +#include #include /** -- 2.39.5