diff mbox series

[U-Boot,03/10] x86: Create a new fsp_arch.h header

Message ID 20190818225117.142845-4-sjg@chromium.org
State Superseded
Delegated to: Bin Meng
Headers show
Series [U-Boot,01/10] x86: Rename existing FSP code to fsp1 | expand

Commit Message

Simon Glass Aug. 18, 2019, 10:51 p.m. UTC
At present fsp_support.h includes fsp_vpd.h which is an FPSv1 concept
(VPD means Vital Product Data). For FSPv2 only UPD (Updatable Product
Data) is used.

To avoid mangling header files, put these two includes in a separate
header which we can adjust as necessary for FSPv2.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 arch/x86/include/asm/fsp1/fsp_support.h |  3 +--
 arch/x86/include/asm/fsp_arch.h         | 20 ++++++++++++++++++++
 2 files changed, 21 insertions(+), 2 deletions(-)
 create mode 100644 arch/x86/include/asm/fsp_arch.h

Comments

Bin Meng Aug. 20, 2019, 3:33 a.m. UTC | #1
On Mon, Aug 19, 2019 at 6:51 AM Simon Glass <sjg@chromium.org> wrote:
>
> At present fsp_support.h includes fsp_vpd.h which is an FPSv1 concept
> (VPD means Vital Product Data). For FSPv2 only UPD (Updatable Product
> Data) is used.
>
> To avoid mangling header files, put these two includes in a separate
> header which we can adjust as necessary for FSPv2.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>  arch/x86/include/asm/fsp1/fsp_support.h |  3 +--
>  arch/x86/include/asm/fsp_arch.h         | 20 ++++++++++++++++++++
>  2 files changed, 21 insertions(+), 2 deletions(-)
>  create mode 100644 arch/x86/include/asm/fsp_arch.h
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
diff mbox series

Patch

diff --git a/arch/x86/include/asm/fsp1/fsp_support.h b/arch/x86/include/asm/fsp1/fsp_support.h
index 72fbcbc393..423b523e60 100644
--- a/arch/x86/include/asm/fsp1/fsp_support.h
+++ b/arch/x86/include/asm/fsp1/fsp_support.h
@@ -14,8 +14,7 @@ 
 #include "fsp_api.h"
 #include "fsp_infoheader.h"
 #include "fsp_bootmode.h"
-#include <asm/arch/fsp/fsp_vpd.h>
-#include <asm/arch/fsp/fsp_configs.h>
+#include <asm/fsp_arch.h>
 
 #define FSP_LOWMEM_BASE		0x100000UL
 #define FSP_HIGHMEM_BASE	0x100000000ULL
diff --git a/arch/x86/include/asm/fsp_arch.h b/arch/x86/include/asm/fsp_arch.h
new file mode 100644
index 0000000000..fb7f9109f7
--- /dev/null
+++ b/arch/x86/include/asm/fsp_arch.h
@@ -0,0 +1,20 @@ 
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2019 Google LLC
+ * Written by Simon Glass <sjg@chromium.org>
+ *
+ * Architecture-specific definitions (FSP config and VPD/UPD)
+ */
+
+#ifndef __FSP_ARCH_H__
+#define __FSP_ARCH_H__
+
+/*
+ * Note: use #ifndef __ASSEMBLY__ around any struct definitions or other C code
+ * since this file can be included from assembly.
+ */
+
+#include <asm/arch/fsp/fsp_vpd.h>
+#include <asm/arch/fsp/fsp_configs.h>
+
+#endif