printk_foo -> printk(BIOS_FOO, ...)
[coreboot.git] / src / mainboard / gigabyte / ga_2761gxdk / get_bus_conf.c
index 5ae3875015ecaff97460958f76b2aa1b0db37326..3746918dd30bcb29c75e6df299bc5c62efc31b78 100644 (file)
@@ -31,6 +31,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
@@ -82,7 +83,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];
@@ -116,7 +117,7 @@ void get_bus_conf(void)
                        for(j=bus_sis966[1];j<bus_sis966[2]; j++) bus_type[j] = 1;
                 }
                 else {
-                        printk_debug("ERROR - could not find PCI 1:%02x.0, using defaults\n", sbdn + 0x06);
+                        printk(BIOS_DEBUG, "ERROR - could not find PCI 1:%02x.0, using defaults\n", sbdn + 0x06);
 
                         bus_sis966[1] = 2;
                         bus_sis966[2] = 3;
@@ -131,7 +132,7 @@ void get_bus_conf(void)
                                for(j=bus_sis966[i];j<bus_isa; j++) bus_type[j] = 1;
                        }
                        else {
-                               printk_debug("ERROR - could not find PCI %02x:%02x.0, using defaults\n", bus_sis966[0], sbdn + 0x0a + i - 2 );
+                               printk(BIOS_DEBUG, "ERROR - could not find PCI %02x:%02x.0, using defaults\n", bus_sis966[0], sbdn + 0x0a + i - 2 );
                                bus_isa = bus_sis966[i-1]+1;
                        }
                }