Skip to contentSkip to conversation

fsp: Move and rename fsp_types.h file

PATCH New Sughosh Ganu 3 participants 4 messages Dec 11, 2020 – Dec 22, 2020 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fsp: Move and rename fsp_types.h file

The fsp_types.h header file contains macros for building signatures of different widths. These signature macros are architecture agnostic, and can be used in all places which use signatures in a data structure. Move and rename the fsp_types.h under the common include header.

---

Build tested for cougarcanyon2 board which builds the relevant fsp code.

 arch/x86/include/asm/fsp/fsp_support.h                      | 3 ++-
 .../asm/fsp/fsp_types.h => include/signature_types.h        | 6 +++---
 2 files changed, 5 insertions(+), 4 deletions(-)
 rename arch/x86/include/asm/fsp/fsp_types.h => include/signature_types.h (94%)
arch/x86/include/asm/fsp/fsp_support.h +2 -1
index 29e511415c..7651a0dac0 100644
@@ -11,10 +11,11 @@
 #include <asm/fsp/fsp_fv.h>
 #include <asm/fsp/fsp_hob.h>
 #include <asm/fsp/fsp_infoheader.h>
-#include <asm/fsp/fsp_types.h>
 #include <asm/fsp_arch.h>
 #include <asm/fsp/fsp_azalia.h>
 
+#include <signature_types.h>
+
 #define FSP_LOWMEM_BASE		0x100000UL
 #define FSP_HIGHMEM_BASE	0x100000000ULL
 #define UPD_TERMINATOR		0x55AA
include/signature_types.h renamed from arch/x86/include/asm/fsp/fsp_types.h +3 -3
similarity index 94%
rename from arch/x86/include/asm/fsp/fsp_types.h
rename to include/signature_types.h
index 3d5b17ecf1..9b8c0543f6 100644
@@ -4,8 +4,8 @@
  * Copyright (C) 2014, Bin Meng <[email protected]>
  */
 
-#ifndef __FSP_TYPES_H__
-#define __FSP_TYPES_H__
+#ifndef __SIGNATURE_TYPES_H__
+#define __SIGNATURE_TYPES_H__
 
 /**
  * Returns a 16-bit signature built from 2 ASCII characters.
@@ -59,4 +59,4 @@
 #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
+#endif /* __SIGNATURE_TYPES_H__ */
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 fsp: Move and rename fsp_types.h file

Hi Sughosh,

Quoted 7 lines · Sughosh Ganu

The fsp_types.h header file contains macros for building signatures of different widths. These signature macros are architecture agnostic, and can be used in all places which use signatures in a data structure. Move and rename the fsp_types.h under the common include header.

Quoted 8 lines

---

Build tested for cougarcanyon2 board which builds the relevant fsp code.

 arch/x86/include/asm/fsp/fsp_support.h                      | 3 ++-
 .../asm/fsp/fsp_types.h => include/signature_types.h        | 6 +++---

How about just signatures.h ?

Quoted 8 lines
 2 files changed, 5 insertions(+), 4 deletions(-)
 rename arch/x86/include/asm/fsp/fsp_types.h => include/signature_types.h (94%)
arch/x86/include/asm/fsp/fsp_support.h +0 -0
index 29e511415c..7651a0dac0 100644

arch/x86/include/asm/fsp/fsp_support.h line 17

Quoted 8 lines
arch/x86/include/asm/fsp/fsp_support.h +1 -1
@@ -11,10 +11,11 @@
 #include <asm/fsp/fsp_fv.h>
 #include <asm/fsp/fsp_hob.h>
 #include <asm/fsp/fsp_infoheader.h>
-#include <asm/fsp/fsp_types.h>
 #include <asm/fsp_arch.h>
 #include <asm/fsp/fsp_azalia.h>
 
+#include <signature_types.h>

Can you put that at the top, as we normally put asm headers below common ones.

Quoted 29 lines
arch/x86/include/asm/fsp/fsp_support.h +1 -0
+
 #define FSP_LOWMEM_BASE                0x100000UL
 #define FSP_HIGHMEM_BASE       0x100000000ULL
 #define UPD_TERMINATOR         0x55AA
include/signature_types.h renamed from arch/x86/include/asm/fsp/fsp_types.h +3 -4
similarity index 94%
rename from arch/x86/include/asm/fsp/fsp_types.h
rename to include/signature_types.h
index 3d5b17ecf1..9b8c0543f6 100644
@@ -4,8 +4,8 @@
  * Copyright (C) 2014, Bin Meng <[email protected]>
  */
 
-#ifndef __FSP_TYPES_H__
-#define __FSP_TYPES_H__
+#ifndef __SIGNATURE_TYPES_H__
+#define __SIGNATURE_TYPES_H__
 
 /**
  * Returns a 16-bit signature built from 2 ASCII characters.
@@ -59,4 +59,4 @@
 #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
+#endif /* __SIGNATURE_TYPES_H__ */
--
Quoted 2 lines

2.17.1

Regards,
Simon

#2 lore raw

PATCH 1/1 fsp: Move and rename fsp_types.h file

hi Simon,

Quoted 14 lines · Simon Glass

Hi Sughosh,

Quoted 10 lines · Sughosh Ganu

The fsp_types.h header file contains macros for building signatures of different widths. These signature macros are architecture agnostic, and can be used in all places which use signatures in a data structure. Move and rename the fsp_types.h under the common include header.

---

Quoted 8 lines
Quoted 5 lines

Build tested for cougarcanyon2 board which builds the relevant fsp code.

 arch/x86/include/asm/fsp/fsp_support.h                      | 3 ++-
 .../asm/fsp/fsp_types.h => include/signature_types.h        | 6 +++---

How about just signatures.h ?

Ok. Will change.

Quoted 17 lines
Quoted 2 lines
 2 files changed, 5 insertions(+), 4 deletions(-)
 rename arch/x86/include/asm/fsp/fsp_types.h =>

include/signature_types.h (94%)

Review

Quoted 2 lines
(quoted diff) +0 -0

b/arch/x86/include/asm/fsp/fsp_support.h

Quoted 11 lines

index 29e511415c..7651a0dac0 100644

arch/x86/include/asm/fsp/fsp_support.h +0 -1
@@ -11,10 +11,11 @@
 #include <asm/fsp/fsp_fv.h>
 #include <asm/fsp/fsp_hob.h>
 #include <asm/fsp/fsp_infoheader.h>
-#include <asm/fsp/fsp_types.h>
 #include <asm/fsp_arch.h>
 #include <asm/fsp/fsp_azalia.h>
 
Quoted 5 lines

arch/x86/include/asm/fsp/fsp_support.h line 17

Quoted 1 line
arch/x86/include/asm/fsp/fsp_support.h +1 -0
+#include <signature_types.h>

Can you put that at the top, as we normally put asm headers below common ones.

Sure, I will re-arrange. Thanks for your review.

-sughosh

#3 lore raw

PATCH 1/1 fsp: Move and rename fsp_types.h file

In reply to Sughosh Ganu
Quoted 10 lines · Sughosh Ganu

The fsp_types.h header file contains macros for building signatures of different widths. These signature macros are architecture agnostic, and can be used in all places which use signatures in a data structure. Move and rename the fsp_types.h under the common include header.

---

Quoted 8 lines

Build tested for cougarcanyon2 board which builds the relevant fsp code.

 arch/x86/include/asm/fsp/fsp_support.h                      | 3 ++-
 .../asm/fsp/fsp_types.h => include/signature_types.h        | 6 +++---
 2 files changed, 5 insertions(+), 4 deletions(-)
 rename arch/x86/include/asm/fsp/fsp_types.h => include/signature_types.h (94%)