summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/devices/device.c4
-rw-r--r--src/include/device/device.h3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/devices/device.c b/src/devices/device.c
index 344f8240de30..6b1902d572c6 100644
--- a/src/devices/device.c
+++ b/src/devices/device.c
@@ -923,8 +923,8 @@ void dev_enumerate(void)
printk(BIOS_SPEW, "Compare with tree...\n");
show_devs_tree(root, BIOS_SPEW, 0, 0);
- if (mainboard_ops.enable_dev)
- mainboard_ops.enable_dev(root);
+ if (root->chip_ops && root->chip_ops->enable_dev)
+ root->chip_ops->enable_dev(root);
if (!root->ops || !root->ops->scan_bus) {
printk(BIOS_ERR, "dev_root missing scan_bus operation");
diff --git a/src/include/device/device.h b/src/include/device/device.h
index b44a551d77dd..772b737cd94a 100644
--- a/src/include/device/device.h
+++ b/src/include/device/device.h
@@ -102,7 +102,9 @@ struct device {
ROMSTAGE_CONST struct bus *link_list;
struct device_operations *ops;
+#ifndef __PRE_RAM__
const struct chip_operations *chip_ops;
+#endif
ROMSTAGE_CONST void *chip_info;
};
@@ -171,7 +173,6 @@ void show_all_devs_resources(int debug_level, const char* msg);
#define DEVICE_MEM_ALIGN 4096
extern struct device_operations default_dev_ops_root;
-extern struct chip_operations mainboard_ops;
void pci_domain_read_resources(struct device *dev);
unsigned int pci_domain_scan_bus(struct device *dev, unsigned int max);
unsigned int scan_static_bus(device_t bus, unsigned int max);