printk_foo -> printk(BIOS_FOO, ...)
[coreboot.git] / src / cpu / emulation / qemu-x86 / northbridge.c
index b45315e899a376b446f699a8537f4ce1af9d9d92..d2e5abea91160c4250f4ebd396771e78a102e568 100644 (file)
@@ -8,6 +8,7 @@
 #include <bitops.h>
 #include "chip.h"
 #include "northbridge.h"
+#include <delay.h>
 
 static void ram_resource(device_t dev, unsigned long index,
        unsigned long basek, unsigned long sizek)
@@ -48,7 +49,7 @@ static uint32_t find_pci_tolm(struct bus *bus)
        return tolm;
 }
 
-#if CONFIG_HAVE_HIGH_TABLES==1
+#if CONFIG_WRITE_HIGH_TABLES==1
 #define HIGH_TABLES_SIZE 64    // maximum size of high tables in KB
 extern uint64_t high_tables_base, high_tables_size;
 #endif
@@ -80,14 +81,14 @@ static void cpu_pci_domain_set_resources(device_t dev)
                        if (reg > rambits)
                                rambits = reg;
                        if (reg < rambits)
-                               printk_err("ERROR! register 0x%x is not set!\n",
+                               printk(BIOS_ERR, "ERROR! register 0x%x is not set!\n",
                                        ramregs[i]);
                }
                if (rambits == 0) {
-                       printk_err("RAM size config registers are empty; defaulting to 64 MBytes\n");
+                       printk(BIOS_ERR, "RAM size config registers are empty; defaulting to 64 MBytes\n");
                        rambits = 8;
                }
-               printk_debug("I would set ram size to 0x%x Kbytes\n", (rambits)*8*1024);
+               printk(BIOS_DEBUG, "I would set ram size to 0x%x Kbytes\n", (rambits)*8*1024);
                tomk = rambits*8*1024;
                /* Compute the top of Low memory */
                tolmk = pci_tolm >> 10;
@@ -101,7 +102,7 @@ static void cpu_pci_domain_set_resources(device_t dev)
                ram_resource(dev, idx++, 0, 640);
                ram_resource(dev, idx++, 768, tolmk - 768);
 
-#if CONFIG_HAVE_HIGH_TABLES==1
+#if CONFIG_WRITE_HIGH_TABLES==1
                /* Leave some space for ACPI, PIRQ and MP tables */
                high_tables_base = (tomk - HIGH_TABLES_SIZE) * 1024;
                high_tables_size = HIGH_TABLES_SIZE * 1024;
@@ -156,12 +157,3 @@ struct chip_operations cpu_emulation_qemu_x86_ops = {
        CHIP_NAME("QEMU Northbridge")
        .enable_dev = enable_dev,
 };
-
-void udelay(int usecs)
-{
-       int i;
-       for(i = 0; i < usecs; i++)
-               inb(0x80);
-}
-
-