[coreboot] New patch to review for coreboot: 8fd8052 Fix mainboard level enable_dev()

Kyösti Mälkki (kyosti.malkki@gmail.com) gerrit at coreboot.org
Fri Jul 27 18:53:03 CEST 2012

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/1374


commit 8fd805233a39512d85c3f49bf4527ad49637ba40
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date:   Fri Jul 27 19:22:26 2012 +0300

    Fix mainboard level enable_dev()
    Commit 188e3c2ff06a82f61d7d71e610b32b1a250c0a45 dropped mainboard
    out of the static device tree. This left dev_root->chip_ops unset,
    and mainboard_ops.enable_dev() was no longer called.
    Change-Id: I6d447c8049a66041b8bb36ec9aac3e7e0d20a99b
    Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
 src/devices/device.c        |    4 ++--
 src/include/device/device.h |    1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/devices/device.c b/src/devices/device.c
index 92a4447..d0e801b 100644
--- a/src/devices/device.c
+++ b/src/devices/device.c
@@ -922,8 +922,8 @@ void dev_enumerate(void)
 	printk(BIOS_SPEW, "Compare with tree...\n");
 	show_devs_tree(root, BIOS_SPEW, 0, 0);
-	if (root->chip_ops && root->chip_ops->enable_dev)
-		root->chip_ops->enable_dev(root);
+	if (mainboard_ops.enable_dev)
+		mainboard_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 1515b45..58e92d5 100644
--- a/src/include/device/device.h
+++ b/src/include/device/device.h
@@ -166,6 +166,7 @@ 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);

More information about the coreboot mailing list