printk_foo -> printk(BIOS_FOO, ...)
[coreboot.git] / src / mainboard / gigabyte / m57sli / get_bus_conf.c
index 70a56b81b5333b4e2bccb29a2dcfeb6a268e62d7..9e5a1b09a16ce5491fe6c02dd584577541ce65ba 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * This file is part of the LinuxBIOS project.
+ * This file is part of the coreboot project.
  *
  * Copyright (C) 2007 AMD
  * Written by Yinghai Lu <yinghailu@amd.com> for AMD.
@@ -29,6 +29,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
@@ -80,7 +81,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];
@@ -114,7 +115,7 @@ void get_bus_conf(void)
                        for(j=bus_mcp55[1];j<bus_mcp55[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_mcp55[1] = 2;
                         bus_mcp55[2] = 3;
@@ -129,7 +130,7 @@ void get_bus_conf(void)
                                for(j=bus_mcp55[i];j<bus_isa; j++) bus_type[j] = 1;
                        }
                        else {
-                               printk_debug("ERROR - could not find PCI %02x:%02x.0, using defaults\n", bus_mcp55[0], sbdn + 0x0a + i - 2 );
+                               printk(BIOS_DEBUG, "ERROR - could not find PCI %02x:%02x.0, using defaults\n", bus_mcp55[0], sbdn + 0x0a + i - 2 );
                                bus_isa = bus_mcp55[i-1]+1;
                        }
                }