[coreboot-gerrit] New patch to review for coreboot: c80879f PCI: Guard pci.h with CONFIG_PCI

Kyösti Mälkki (kyosti.malkki@gmail.com) gerrit at coreboot.org
Wed Feb 12 13:56:28 CET 2014


Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5199

-gerrit

commit c80879f36e0d0b7295510edbaad26d9807ce5007
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date:   Wed Feb 12 14:18:50 2014 +0200

    PCI: Guard pci.h with CONFIG_PCI
    
    Adding PCI functions for romstage in pci.h breaks ARMv7 build without
    this. Also fix two related includes to use pci_def.h instead.
    
    Change-Id: I5291eaf6ddf5a584f50af29cf791d2ca4d9caa71
    Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
 src/device/device.c      | 2 +-
 src/device/device_util.c | 2 +-
 src/include/device/pci.h | 5 +++++
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/device/device.c b/src/device/device.c
index 9e06810..e068cee 100644
--- a/src/device/device.c
+++ b/src/device/device.c
@@ -35,7 +35,7 @@
 #include <console/console.h>
 #include <arch/io.h>
 #include <device/device.h>
-#include <device/pci.h>
+#include <device/pci_def.h>
 #include <device/pci_ids.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/src/device/device_util.c b/src/device/device_util.c
index dc43b9a..2bed4a9 100644
--- a/src/device/device_util.c
+++ b/src/device/device_util.c
@@ -25,7 +25,7 @@
 #include <console/console.h>
 #include <device/device.h>
 #include <device/path.h>
-#include <device/pci.h>
+#include <device/pci_def.h>
 #include <device/resource.h>
 #include <string.h>
 
diff --git a/src/include/device/pci.h b/src/include/device/pci.h
index 1741c0d..7504cc7 100644
--- a/src/include/device/pci.h
+++ b/src/include/device/pci.h
@@ -15,6 +15,8 @@
 #ifndef PCI_H
 #define PCI_H
 
+#if CONFIG_PCI
+
 #include <stdint.h>
 #include <stddef.h>
 #include <arch/rules.h>
@@ -98,4 +100,7 @@ static inline const struct pci_operations *ops_pci(device_t dev)
 }
 
 #endif /* ! __SIMPLE_DEVICE__ */
+
+#endif /* CONFIG_PCI */
+
 #endif /* PCI_H */



More information about the coreboot-gerrit mailing list