printk_foo -> printk(BIOS_FOO, ...)
[coreboot.git] / src / mainboard / broadcom / blast / get_bus_conf.c
index 95f9d12175cdba4154eba72bde30aec00bec3925..cfe525708071fba14c69e9830ad880fda1f535d1 100644 (file)
@@ -8,6 +8,7 @@
 #endif
 
 #include <cpu/amd/amdk8_sysconf.h>
+#include <stdlib.h>
 
 
 // Global variables for MB layouts and these will be shared by irqtable mptable and acpi_tables
@@ -61,7 +62,7 @@ void get_bus_conf(void)
 
         get_bus_conf_done = 1;
 
-        sysconf.hc_possible_num = sizeof(pci1234x)/sizeof(pci1234x[0]);
+        sysconf.hc_possible_num = ARRAY_SIZE(pci1234x);
         for(i=0;i<sysconf.hc_possible_num; i++) {
                 sysconf.pci1234[i] = pci1234x[i];
                 sysconf.hcdn[i] = hcdnx[i];
@@ -82,15 +83,15 @@ void get_bus_conf(void)
                dev = dev_find_slot(bus_bcm5785_1, PCI_DEVFN(0x0d,0));
                if(dev) {
                        bus_bcm5785_1_1 = pci_read_config8(dev, PCI_SECONDARY_BUS);
-#if HT_CHAIN_END_UNITID_BASE >= HT_CHAIN_UNITID_BASE
+#if CONFIG_HT_CHAIN_END_UNITID_BASE >= CONFIG_HT_CHAIN_UNITID_BASE
                        bus_isa    = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
                        bus_isa++;
-//                     printk_debug("bus_isa=%d\n",bus_isa);
+//                     printk(BIOS_DEBUG, "bus_isa=%d\n",bus_isa);
 #endif
                }
         }
        else {
-                printk_debug("ERROR - could not find PCI %02x:07.0, using defaults\n", bus_bcm5785_0);
+                printk(BIOS_DEBUG, "ERROR - could not find PCI %02x:07.0, using defaults\n", bus_bcm5785_0);
         }
 
                /* bcm5780 */
@@ -98,15 +99,15 @@ void get_bus_conf(void)
                dev = dev_find_slot(bus_bcm5780[0], PCI_DEVFN(sbdn2 + i - 1,0));
                if(dev) {
                        bus_bcm5780[i] = pci_read_config8(dev, PCI_SECONDARY_BUS);
-#if HT_CHAIN_END_UNITID_BASE < HT_CHAIN_UNITID_BASE
+#if CONFIG_HT_CHAIN_END_UNITID_BASE < CONFIG_HT_CHAIN_UNITID_BASE
                         bus_isa    = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
                         bus_isa++;
-//                      printk_debug("bus_isa=%d\n",bus_isa);
+//                      printk(BIOS_DEBUG, "bus_isa=%d\n",bus_isa);
 #endif
 
                }
                else {
-                       printk_debug("ERROR - could not find PCI %02x:01.0, using defaults\n", bus_bcm5780[i]);
+                       printk(BIOS_DEBUG, "ERROR - could not find PCI %02x:01.0, using defaults\n", bus_bcm5780[i]);
                }
        }