summaryrefslogtreecommitdiff
path: root/src/southbridge/intel
diff options
context:
space:
mode:
Diffstat (limited to 'src/southbridge/intel')
-rw-r--r--src/southbridge/intel/i82371eb/bootblock.c15
-rw-r--r--src/southbridge/intel/i82371eb/early_pm.c1
-rw-r--r--src/southbridge/intel/i82371eb/early_smbus.c1
3 files changed, 17 insertions, 0 deletions
diff --git a/src/southbridge/intel/i82371eb/bootblock.c b/src/southbridge/intel/i82371eb/bootblock.c
index c59343df91..38b797d5a6 100644
--- a/src/southbridge/intel/i82371eb/bootblock.c
+++ b/src/southbridge/intel/i82371eb/bootblock.c
@@ -17,8 +17,23 @@
#include <stdint.h>
#include <arch/io.h>
#include <device/pci_ids.h>
+#include <device/pci_type.h>
#include "i82371eb.h"
+#define PCI_ID(VENDOR_ID, DEVICE_ID) \
+ ((((DEVICE_ID) & 0xFFFF) << 16) | ((VENDOR_ID) & 0xFFFF))
+
+static pci_devfn_t pci_locate_device(unsigned int pci_id, pci_devfn_t dev)
+{
+ for (; dev <= PCI_DEV(255, 31, 7); dev += PCI_DEV(0, 0, 1)) {
+ unsigned int id;
+ id = pci_read_config32(dev, 0);
+ if (id == pci_id)
+ return dev;
+ }
+ return PCI_DEV_INVALID;
+}
+
static void bootblock_southbridge_init(void)
{
u16 reg16;
diff --git a/src/southbridge/intel/i82371eb/early_pm.c b/src/southbridge/intel/i82371eb/early_pm.c
index 8ae7669f33..720cb0d013 100644
--- a/src/southbridge/intel/i82371eb/early_pm.c
+++ b/src/southbridge/intel/i82371eb/early_pm.c
@@ -16,6 +16,7 @@
#include <stdint.h>
#include <arch/io.h>
+#include <device/pci.h>
#include <device/pci_def.h>
#include <device/pci_ids.h>
#include "i82371eb.h"
diff --git a/src/southbridge/intel/i82371eb/early_smbus.c b/src/southbridge/intel/i82371eb/early_smbus.c
index de16717416..4e91c0aabf 100644
--- a/src/southbridge/intel/i82371eb/early_smbus.c
+++ b/src/southbridge/intel/i82371eb/early_smbus.c
@@ -16,6 +16,7 @@
#include <stdint.h>
#include <arch/io.h>
+#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/pci_def.h>
#include <southbridge/intel/common/smbus.h>