Various Doxygen comment fixes, typo fixes, etc.
[coreboot.git] / src / devices / pci_ops.c
index 6029d757effabef8a96efa90c7a91c3071455161..c3237dbdbfde98fd9db61bd71a02b282ec1103db 100644 (file)
 #include <device/pci_ids.h>
 #include <device/pci_ops.h>
 
+/*
+ * The only consumer of the return value of get_pbus() is ops_pci_bus().
+ * ops_pci_bus() can handle being passed NULL and auto-picks working ops.
+ */
 static struct bus *get_pbus(device_t dev)
 {
        struct bus *pbus = NULL;
@@ -36,7 +40,7 @@ static struct bus *get_pbus(device_t dev)
 
        while(pbus && pbus->dev && !ops_pci_bus(pbus)) {
                if (pbus == pbus->dev->bus) {
-                       printk_alert("%s in endless loop looking for a parent "
+                       printk(BIOS_ALERT, "%s in endless loop looking for a parent "
                                "bus with ops_pci_bus for %s, breaking out.\n",
                                 __func__, dev_path(dev));
                        break;
@@ -44,8 +48,9 @@ static struct bus *get_pbus(device_t dev)
                pbus = pbus->dev->bus;
        }
        if (!pbus || !pbus->dev || !pbus->dev->ops || !pbus->dev->ops->ops_pci_bus) {
-               printk_emerg("%s: Cannot find pci bus operations.\n", dev_path(dev));
-               die("");
+               /* This can happen before the device tree is set up completely. */
+               //printk(BIOS_EMERG, "%s: Cannot find pci bus operations.\n", dev_path(dev));
+               pbus = NULL;
        }
        return pbus;
 }