printk_foo -> printk(BIOS_FOO, ...)
[coreboot.git] / src / mainboard / msi / ms7260 / get_bus_conf.c
index c61302ad8a6f6915f79ba502f94155aa4fd36fbf..749be0e33d30957bb06ab5e7b490c1b5891e962b 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.
@@ -28,6 +28,7 @@
 #include <cpu/amd/dualcore.h>
 #endif
 #include <cpu/amd/amdk8_sysconf.h>
+#include <stdlib.h>
 
 /* Global variables for MB layouts (shared by irqtable/mptable/acpi_table). */
 // busnum is default.
@@ -81,7 +82,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];
@@ -113,8 +114,8 @@ 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",
+               printk
+                   (BIOS_DEBUG, "ERROR - could not find PCI 1:%02x.0, using defaults\n",
                     sbdn + 0x06);
 
                bus_mcp55[1] = 2;
@@ -131,8 +132,8 @@ 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",
+                       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;
                }