aboutsummaryrefslogtreecommitdiff
path: root/src/devices/pci_device.c
diff options
context:
space:
mode:
authorEric Biederman <ebiederm@xmission.com>2004-11-18 22:38:08 +0000
committerEric Biederman <ebiederm@xmission.com>2004-11-18 22:38:08 +0000
commita9e632c2ac29c60872e7e4f9314263b34ce5031d (patch)
tree2a76647833896d68306553c548a65743c87b417e /src/devices/pci_device.c
parentbec8acedf18b4d35f95b4a4c254eb925bd4d53bd (diff)
- First stab at getting the ppc ports building and working.
- The sandpointx3+altimus has been consolidated into one directory for now. - Added support for having different versions of the pci access functions on a per bus basis if needed. Hopefully I have not broken something inadvertently. git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1786 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/devices/pci_device.c')
-rw-r--r--src/devices/pci_device.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/devices/pci_device.c b/src/devices/pci_device.c
index 1c8c8bea84..bd5e2775fe 100644
--- a/src/devices/pci_device.c
+++ b/src/devices/pci_device.c
@@ -480,7 +480,7 @@ void pci_dev_set_resources(struct device *dev)
void pci_dev_enable_resources(struct device *dev)
{
- struct pci_operations *ops;
+ const struct pci_operations *ops;
uint16_t command;
/* Set the subsystem vendor and device id for mainboard devices */
@@ -515,6 +515,7 @@ void pci_bus_enable_resources(struct device *dev)
enable_childrens_resources(dev);
}
+
void pci_dev_set_subsystem(device_t dev, unsigned vendor, unsigned device)
{
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
@@ -522,7 +523,7 @@ void pci_dev_set_subsystem(device_t dev, unsigned vendor, unsigned device)
}
/** Default device operation for PCI devices */
-static struct pci_operations pci_ops_pci_dev = {
+static struct pci_operations pci_dev_ops_pci = {
.set_subsystem = pci_dev_set_subsystem,
};
@@ -533,11 +534,11 @@ struct device_operations default_pci_ops_dev = {
.init = 0,
.scan_bus = 0,
.enable = 0,
- .ops_pci = &pci_ops_pci_dev,
+ .ops_pci = &pci_dev_ops_pci,
};
/** Default device operations for PCI bridges */
-static struct pci_operations pci_ops_pci_bus = {
+static struct pci_operations pci_bus_ops_pci = {
.set_subsystem = 0,
};
struct device_operations default_pci_ops_bus = {
@@ -547,7 +548,7 @@ struct device_operations default_pci_ops_bus = {
.init = 0,
.scan_bus = pci_scan_bridge,
.enable = 0,
- .ops_pci = &pci_ops_pci_bus,
+ .ops_pci = &pci_bus_ops_pci,
};
/**
@@ -857,6 +858,7 @@ unsigned int pci_scan_bridge(struct device *dev, unsigned int max)
uint16_t cr;
bus = &dev->link[0];
+ bus->dev = dev;
dev->links = 1;
/* Set up the primary, secondary and subordinate bus numbers. We have