[coreboot-gerrit] Patch set updated for coreboot: f413397 Fix redefinition of typedef error in gcc 4.5.

Wei Hu (wei@aristanetworks.com) gerrit at coreboot.org
Fri Sep 20 18:38:41 CEST 2013


Wei Hu (wei at aristanetworks.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3931

-gerrit

commit f413397bd25dc971892ae6021839663f292d149c
Author: Wei Hu <wei at aristanetworks.com>
Date:   Fri Sep 20 03:47:02 2013 -0700

    Fix redefinition of typedef error in gcc 4.5.
    
    This was not legal in C99 but is now allowed in C11.
    http://stackoverflow.com/a/8595191/111391
    
    Include two header files to bring in typedef pci_devfn_t.
    Tested with and without CONFIG_USBDEBUG.
    
    Change-Id: I72ac1d2227897a806739be4808bc999956da2d41
    Signed-off-by: Wei Hu <wei at aristanetworks.com>
---
 src/include/usbdebug.h                      | 4 +++-
 src/southbridge/amd/cimx/sb800/SBPLATFORM.h | 3 ++-
 src/southbridge/amd/cimx/sb900/SbPlatform.h | 3 ++-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/include/usbdebug.h b/src/include/usbdebug.h
index 926d658..0d5d8de 100644
--- a/src/include/usbdebug.h
+++ b/src/include/usbdebug.h
@@ -24,7 +24,9 @@
 #define EHCI_BAR_INDEX		0x10
 #define PCI_EHCI_CLASSCODE 	0x0c0320	/* USB2.0 with EHCI controller */
 
-typedef u32 pci_devfn_t;
+#include <arch/io.h>
+#include <device/device.h>
+
 pci_devfn_t pci_ehci_dbg_dev(unsigned hcd_idx);
 unsigned long pci_ehci_base_regs(pci_devfn_t dev);
 void pci_ehci_dbg_set_port(pci_devfn_t dev, unsigned int port);
diff --git a/src/southbridge/amd/cimx/sb800/SBPLATFORM.h b/src/southbridge/amd/cimx/sb800/SBPLATFORM.h
index fa7d196..68f761f 100644
--- a/src/southbridge/amd/cimx/sb800/SBPLATFORM.h
+++ b/src/southbridge/amd/cimx/sb800/SBPLATFORM.h
@@ -24,6 +24,8 @@
 #ifndef  _AMD_SBPLATFORM_H_
 #define  _AMD_SBPLATFORM_H_
 
+#include <console/console.h>
+
 //#include "cbtypes.h"
 #ifdef NULL
   #undef NULL
@@ -61,7 +63,6 @@ typedef union _PCI_ADDR {
 	#define IMC_ENABLE_OVER_WRITE        0x01
 #endif
 
-#include <console/console.h>
 #include "AmdSbLib.h"
 #include "Amd.h"
 #include "SB800.h"
diff --git a/src/southbridge/amd/cimx/sb900/SbPlatform.h b/src/southbridge/amd/cimx/sb900/SbPlatform.h
index 36c186a..2357e5b 100644
--- a/src/southbridge/amd/cimx/sb900/SbPlatform.h
+++ b/src/southbridge/amd/cimx/sb900/SbPlatform.h
@@ -24,6 +24,8 @@
 #ifndef  _AMD_SBPLATFORM_H_
 #define  _AMD_SBPLATFORM_H_
 
+#include <console/console.h>
+
 //#include "cbtypes.h"
 #ifdef NULL
   #undef NULL
@@ -57,7 +59,6 @@ typedef union _PCI_ADDR {
 #endif
 #define FIXUP_PTR(ptr)  ptr
 
-#include <console/console.h>
 #include "AmdSbLib.h"
 #include "Amd.h"
 #include "Hudson-2.h"



More information about the coreboot-gerrit mailing list