x86: Move fsp_types.h to the generic fsp directory
authorSimon Glass <sjg@chromium.org>
Wed, 25 Sep 2019 14:00:15 +0000 (08:00 -0600)
committerBin Meng <bmeng.cn@gmail.com>
Tue, 8 Oct 2019 05:50:31 +0000 (13:50 +0800)
This header file is the same for FSP v1 and v2. Move it into the general
fsp directory.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/include/asm/fsp/fsp_types.h [new file with mode: 0644]
arch/x86/include/asm/fsp1/fsp_support.h
arch/x86/include/asm/fsp1/fsp_types.h [deleted file]

diff --git a/arch/x86/include/asm/fsp/fsp_types.h b/arch/x86/include/asm/fsp/fsp_types.h
new file mode 100644 (file)
index 0000000..3d5b17e
--- /dev/null
@@ -0,0 +1,62 @@
+/* SPDX-License-Identifier: Intel */
+/*
+ * Copyright (C) 2013, Intel Corporation
+ * Copyright (C) 2014, Bin Meng <bmeng.cn@gmail.com>
+ */
+
+#ifndef __FSP_TYPES_H__
+#define __FSP_TYPES_H__
+
+/**
+ * Returns a 16-bit signature built from 2 ASCII characters.
+ *
+ * This macro returns a 16-bit value built from the two ASCII characters
+ * specified by A and B.
+ *
+ * @A: The first ASCII character.
+ * @B: The second ASCII character.
+ *
+ * @return: A 16-bit value built from the two ASCII characters specified by
+ *          A and B.
+ */
+#define SIGNATURE_16(A, B)     ((A) | (B << 8))
+
+/**
+ * Returns a 32-bit signature built from 4 ASCII characters.
+ *
+ * This macro returns a 32-bit value built from the four ASCII characters
+ * specified by A, B, C, and D.
+ *
+ * @A: The first ASCII character.
+ * @B: The second ASCII character.
+ * @C: The third ASCII character.
+ * @D: The fourth ASCII character.
+ *
+ * @return: A 32-bit value built from the two ASCII characters specified by
+ *          A, B, C and D.
+ */
+#define SIGNATURE_32(A, B, C, D)       \
+       (SIGNATURE_16(A, B) | (SIGNATURE_16(C, D) << 16))
+
+/**
+ * Returns a 64-bit signature built from 8 ASCII characters.
+ *
+ * This macro returns a 64-bit value built from the eight ASCII characters
+ * specified by A, B, C, D, E, F, G,and H.
+ *
+ * @A: The first ASCII character.
+ * @B: The second ASCII character.
+ * @C: The third ASCII character.
+ * @D: The fourth ASCII character.
+ * @E: The fifth ASCII character.
+ * @F: The sixth ASCII character.
+ * @G: The seventh ASCII character.
+ * @H: The eighth ASCII character.
+ *
+ * @return: A 64-bit value built from the two ASCII characters specified by
+ *          A, B, C, D, E, F, G and H.
+ */
+#define SIGNATURE_64(A, B, C, D, E, F, G, H)   \
+       (SIGNATURE_32(A, B, C, D) | ((u64)(SIGNATURE_32(E, F, G, H)) << 32))
+
+#endif
index c75afe935673d06950992549035f6d40f1324099..e5ec2af83e10c3824f7f4746f792c9357f9352a3 100644 (file)
@@ -7,7 +7,7 @@
 #ifndef __FSP_SUPPORT_H__
 #define __FSP_SUPPORT_H__
 
-#include "fsp_types.h"
+#include <asm/fsp/fsp_types.h>
 #include "fsp_hob.h"
 #include "fsp_fv.h"
 #include "fsp_ffs.h"
diff --git a/arch/x86/include/asm/fsp1/fsp_types.h b/arch/x86/include/asm/fsp1/fsp_types.h
deleted file mode 100644 (file)
index 3d5b17e..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/* SPDX-License-Identifier: Intel */
-/*
- * Copyright (C) 2013, Intel Corporation
- * Copyright (C) 2014, Bin Meng <bmeng.cn@gmail.com>
- */
-
-#ifndef __FSP_TYPES_H__
-#define __FSP_TYPES_H__
-
-/**
- * Returns a 16-bit signature built from 2 ASCII characters.
- *
- * This macro returns a 16-bit value built from the two ASCII characters
- * specified by A and B.
- *
- * @A: The first ASCII character.
- * @B: The second ASCII character.
- *
- * @return: A 16-bit value built from the two ASCII characters specified by
- *          A and B.
- */
-#define SIGNATURE_16(A, B)     ((A) | (B << 8))
-
-/**
- * Returns a 32-bit signature built from 4 ASCII characters.
- *
- * This macro returns a 32-bit value built from the four ASCII characters
- * specified by A, B, C, and D.
- *
- * @A: The first ASCII character.
- * @B: The second ASCII character.
- * @C: The third ASCII character.
- * @D: The fourth ASCII character.
- *
- * @return: A 32-bit value built from the two ASCII characters specified by
- *          A, B, C and D.
- */
-#define SIGNATURE_32(A, B, C, D)       \
-       (SIGNATURE_16(A, B) | (SIGNATURE_16(C, D) << 16))
-
-/**
- * Returns a 64-bit signature built from 8 ASCII characters.
- *
- * This macro returns a 64-bit value built from the eight ASCII characters
- * specified by A, B, C, D, E, F, G,and H.
- *
- * @A: The first ASCII character.
- * @B: The second ASCII character.
- * @C: The third ASCII character.
- * @D: The fourth ASCII character.
- * @E: The fifth ASCII character.
- * @F: The sixth ASCII character.
- * @G: The seventh ASCII character.
- * @H: The eighth ASCII character.
- *
- * @return: A 64-bit value built from the two ASCII characters specified by
- *          A, B, C, D, E, F, G and H.
- */
-#define SIGNATURE_64(A, B, C, D, E, F, G, H)   \
-       (SIGNATURE_32(A, B, C, D) | ((u64)(SIGNATURE_32(E, F, G, H)) << 32))
-
-#endif