diff options
Diffstat (limited to 'src/northbridge/via/cn400')
-rw-r--r-- | src/northbridge/via/cn400/agp.c | 20 | ||||
-rw-r--r-- | src/northbridge/via/cn400/northbridge.c | 36 | ||||
-rw-r--r-- | src/northbridge/via/cn400/vga.c | 18 | ||||
-rw-r--r-- | src/northbridge/via/cn400/vgabios.c | 40 | ||||
-rw-r--r-- | src/northbridge/via/cn400/vlink.c | 40 |
5 files changed, 77 insertions, 77 deletions
diff --git a/src/northbridge/via/cn400/agp.c b/src/northbridge/via/cn400/agp.c index c9cca61759..a302759371 100644 --- a/src/northbridge/via/cn400/agp.c +++ b/src/northbridge/via/cn400/agp.c @@ -36,7 +36,7 @@ static void agp_init(device_t dev) int i, j; /* Some of this may not be necessary (should be handled by the OS). */ - printk_debug("Enabling AGP.\n"); + printk(BIOS_DEBUG, "Enabling AGP.\n"); /* Allow R/W access to AGP registers. */ pci_write_config8(dev, 0x4d, 0x05); @@ -113,17 +113,17 @@ static void agp_init(device_t dev) pci_write_config8(dev, 0xc1, 0x02); #ifdef DEBUG_CN400 - printk_spew("%s PCI Header Regs::\n", dev_path(dev)); + printk(BIOS_SPEW, "%s PCI Header Regs::\n", dev_path(dev)); for (i = 0 ; i < 16; i++) { - printk_spew("%02X: ", i*16); + printk(BIOS_SPEW, "%02X: ", i*16); for (j = 0; j < 16; j++) { reg8 = pci_read_config8(dev, j+(i*16)); - printk_spew("%02X ", reg8); + printk(BIOS_SPEW, "%02X ", reg8); } - printk_spew("\n"); + printk(BIOS_SPEW, "\n"); } #endif } @@ -170,7 +170,7 @@ static void agp_bridge_init(device_t dev) u8 reg8; int i, j; - printk_debug("Entering %s\n", __func__); + printk(BIOS_DEBUG, "Entering %s\n", __func__); pci_write_config16(dev, 0x4, 0x0107); @@ -208,17 +208,17 @@ static void agp_bridge_init(device_t dev) pci_write_config8(dev, 0x44, 0x34); pci_write_config8(dev, 0x45, 0x72); - printk_spew("%s PCI Header Regs::\n", dev_path(dev)); + printk(BIOS_SPEW, "%s PCI Header Regs::\n", dev_path(dev)); for (i = 0 ; i < 16; i++) { - printk_spew("%02X: ", i*16); + printk(BIOS_SPEW, "%02X: ", i*16); for (j = 0; j < 16; j++) { reg8 = pci_read_config8(dev, j+(i*16)); - printk_spew("%02X ", reg8); + printk(BIOS_SPEW, "%02X ", reg8); } - printk_spew("\n"); + printk(BIOS_SPEW, "\n"); } } diff --git a/src/northbridge/via/cn400/northbridge.c b/src/northbridge/via/cn400/northbridge.c index 86dea8d3c7..cd6a2abed9 100644 --- a/src/northbridge/via/cn400/northbridge.c +++ b/src/northbridge/via/cn400/northbridge.c @@ -41,7 +41,7 @@ static void memctrl_init(device_t dev) u8 ranks, pagec, paged, pagee, pagef, shadowreg, reg8; int i, j; - printk_spew("Entering cn400 memctrl_init.\n"); + printk(BIOS_SPEW, "Entering cn400 memctrl_init.\n"); /* vlink mirror */ vlink_dev = dev_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_CN400_VLINK, 0); @@ -53,7 +53,7 @@ static void memctrl_init(device_t dev) reg16 = (((u16)(ranks - 1) << 9) & 0xFFF0) | 0x01F0; pci_write_config16(dev, 0x84, reg16); - printk_spew("Low Top Address = 0x%04X\n", reg16); + printk(BIOS_SPEW, "Low Top Address = 0x%04X\n", reg16); /* Set up the VGA framebuffer size and Base Address */ /* Note dependencies between agp.c and vga.c and here */ @@ -110,20 +110,20 @@ static void memctrl_init(device_t dev) pci_write_config8(dev, 0xA0, reg8); #ifdef DEBUG_CN400 - printk_spew("%s PCI Header Regs::\n", dev_path(dev)); + printk(BIOS_SPEW, "%s PCI Header Regs::\n", dev_path(dev)); for (i = 0 ; i < 16; i++) { - printk_spew("%02X: ", i*16); + printk(BIOS_SPEW, "%02X: ", i*16); for (j = 0; j < 16; j++) { reg8 = pci_read_config8(dev, j+(i*16)); - printk_spew("%02X ", reg8); + printk(BIOS_SPEW, "%02X ", reg8); } - printk_spew("\n"); + printk(BIOS_SPEW, "\n"); } #endif - printk_spew("Leaving cn400 %s.\n", __func__); + printk(BIOS_SPEW, "Leaving cn400 %s.\n", __func__); } static const struct device_operations memctrl_operations = { @@ -144,7 +144,7 @@ static void cn400_domain_read_resources(device_t dev) { struct resource *resource; - printk_spew("Entering %s.\n", __func__); + printk(BIOS_SPEW, "Entering %s.\n", __func__); /* Initialize the system wide I/O space constraints. */ resource = new_resource(dev, IOINDEX_SUBTRACTIVE(0, 0)); @@ -158,7 +158,7 @@ static void cn400_domain_read_resources(device_t dev) resource->flags = IORESOURCE_MEM | IORESOURCE_SUBTRACTIVE | IORESOURCE_ASSIGNED; - printk_spew("Leaving %s.\n", __func__); + printk(BIOS_SPEW, "Leaving %s.\n", __func__); } static void ram_resource(device_t dev, unsigned long index, @@ -180,7 +180,7 @@ static void ram_reservation(device_t dev, unsigned long index, { struct resource *res; - printk_spew("Configuring Via C3 LAPIC Fixed Resource\n"); + printk(BIOS_SPEW, "Configuring Via C3 LAPIC Fixed Resource\n"); /* Fixed LAPIC resource */ res = new_resource(dev, 1); res->base = (resource_t) base; @@ -205,7 +205,7 @@ static u32 find_pci_tolm(struct bus *bus) struct resource *min = NULL; u32 tolm; - printk_spew("Entering CN400 find_pci_tolm\n"); + printk(BIOS_SPEW, "Entering CN400 find_pci_tolm\n"); search_bus_resources(bus, IORESOURCE_MEM, IORESOURCE_MEM, tolm_test, &min); @@ -213,7 +213,7 @@ static u32 find_pci_tolm(struct bus *bus) if (min && tolm > min->base) tolm = min->base; - printk_spew("Leaving CN400 find_pci_tolm\n"); + printk(BIOS_SPEW, "Leaving CN400 find_pci_tolm\n"); return tolm; } @@ -229,7 +229,7 @@ static void cn400_domain_set_resources(device_t dev) device_t mc_dev; u32 pci_tolm; - printk_spew("Entering %s.\n", __func__); + printk(BIOS_SPEW, "Entering %s.\n", __func__); pci_tolm = find_pci_tolm(&dev->link[0]); mc_dev = dev_find_device(PCI_VENDOR_ID_VIA, @@ -244,7 +244,7 @@ static void cn400_domain_set_resources(device_t dev) tomk = rambits * 32 * 1024; /* Compute the Top Of Low Memory (TOLM), in Kb. */ tolmk = pci_tolm >> 10; - printk_spew("tomk is 0x%x, tolmk is 0x%08X\n", tomk, tolmk); + printk(BIOS_SPEW, "tomk is 0x%x, tolmk is 0x%08X\n", tomk, tolmk); if (tolmk >= tomk) { /* The PCI hole does does not overlap the memory. */ tolmk = tomk; @@ -254,7 +254,7 @@ static void cn400_domain_set_resources(device_t dev) /* Locate the High Tables at the Top of Low Memory below the Video RAM */ high_tables_base = (uint64_t) (tolmk - (CONFIG_VIDEO_MB *1024) - HIGH_TABLES_SIZE) * 1024; high_tables_size = (uint64_t) HIGH_TABLES_SIZE* 1024; - printk_spew("tom: %lx, high_tables_base: %llx, high_tables_size: %llx\n", tomk*1024, high_tables_base, high_tables_size); + printk(BIOS_SPEW, "tom: %lx, high_tables_base: %llx, high_tables_size: %llx\n", tomk*1024, high_tables_base, high_tables_size); #endif /* Report the memory regions. */ @@ -267,12 +267,12 @@ static void cn400_domain_set_resources(device_t dev) } assign_resources(&dev->link[0]); - printk_spew("Leaving %s.\n", __func__); + printk(BIOS_SPEW, "Leaving %s.\n", __func__); } static unsigned int cn400_domain_scan_bus(device_t dev, unsigned int max) { - printk_debug("Entering %s.\n", __func__); + printk(BIOS_DEBUG, "Entering %s.\n", __func__); max = pci_scan_bus(&dev->link[0], PCI_DEVFN(0, 0), 0xff, max); return max; @@ -305,7 +305,7 @@ static const struct device_operations cpu_bus_ops = { static void enable_dev(struct device *dev) { - printk_spew("In cn400 enable_dev for device %s.\n", dev_path(dev)); + printk(BIOS_SPEW, "In cn400 enable_dev for device %s.\n", dev_path(dev)); /* Set the operations if it is a special bus type. */ if (dev->path.type == DEVICE_PATH_PCI_DOMAIN) { diff --git a/src/northbridge/via/cn400/vga.c b/src/northbridge/via/cn400/vga.c index 5a58d17550..ac222ff157 100644 --- a/src/northbridge/via/cn400/vga.c +++ b/src/northbridge/via/cn400/vga.c @@ -52,14 +52,14 @@ static void vga_init(device_t dev) #endif temp = (0xffffffff - CONFIG_FALLBACK_SIZE - 0xffff); - printk_debug("Copying BOCHS BIOS from 0x%08X to 0xf000\n", temp); + printk(BIOS_DEBUG, "Copying BOCHS BIOS from 0x%08X to 0xf000\n", temp); /* * Copy BOCHS BIOS from 4G-CONFIG_FALLBACK_SIZE-64k (in flash) to 0xf0000 (in RAM) * This is for compatibility with the VGA ROM's BIOS callbacks. */ //memcpy(0xf0000, (0xffffffff - CONFIG_ROM_SIZE - 0xffff), 0x10000); memcpy(0xf0000, temp, 0x10000); - printk_debug("Initializing VGA\n"); + printk(BIOS_DEBUG, "Initializing VGA\n"); /* Set memory rate to 200 MHz. */ outb(0x3d, CRTM_INDEX); @@ -79,12 +79,12 @@ static void vga_init(device_t dev) pci_write_config32(dev, 0x10, 0xf0000008); pci_write_config32(dev, 0x14, 0xf4000000); - printk_debug("INSTALL REAL-MODE IDT\n"); + printk(BIOS_DEBUG, "INSTALL REAL-MODE IDT\n"); setup_realmode_idt(); - printk_debug("DO THE VGA BIOS\n"); + printk(BIOS_DEBUG, "DO THE VGA BIOS\n"); do_vgabios(); /* VGA seems to work without this, but crash & burn with it. */ - // printk_debug("Enable VGA console\n"); + // printk(BIOS_DEBUG, "Enable VGA console\n"); // vga_enable_console(); /* It's not clear if these need to be programmed before or after @@ -106,17 +106,17 @@ static void vga_init(device_t dev) memset(0xf0000, 0, 0x10000); #ifdef DEBUG_CN400 - printk_spew("%s PCI Header Regs::\n", dev_path(dev)); + printk(BIOS_SPEW, "%s PCI Header Regs::\n", dev_path(dev)); for (i = 0 ; i < 16; i++) { - printk_spew("%02X: ", i*16); + printk(BIOS_SPEW, "%02X: ", i*16); for (j = 0; j < 16; j++) { reg8 = pci_read_config8(dev, j+(i*16)); - printk_spew("%02X ", reg8); + printk(BIOS_SPEW, "%02X ", reg8); } - printk_spew("\n"); + printk(BIOS_SPEW, "\n"); } #endif } diff --git a/src/northbridge/via/cn400/vgabios.c b/src/northbridge/via/cn400/vgabios.c index 9620debe9b..0b1cff7541 100644 --- a/src/northbridge/via/cn400/vgabios.c +++ b/src/northbridge/via/cn400/vgabios.c @@ -349,17 +349,17 @@ void do_vgabios(void) dev = dev_find_class(PCI_CLASS_DISPLAY_VGA<<8 , 0); if (!dev) { - printk_debug("NO VGA FOUND\n"); + printk(BIOS_DEBUG, "NO VGA FOUND\n"); return; } - printk_debug("found VGA: vid=%x, did=%x\n", dev->vendor, dev->device); + printk(BIOS_DEBUG, "found VGA: vid=%x, did=%x\n", dev->vendor, dev->device); /* declare rom address here - keep any config data out of the way * of core LXB stuff */ rom = cbfs_load_optionrom(dev->vendor, dev->device, 0); pci_write_config32(dev, PCI_ROM_ADDRESS, rom|1); - printk_debug("VGA BIOS ROM base address: %x\n", rom); + printk(BIOS_DEBUG, "VGA BIOS ROM base address: %x\n", rom); buf = (unsigned char *) rom; if ((buf[0] == 0x55) && (buf[1] == 0xaa)) { @@ -371,13 +371,13 @@ void do_vgabios(void) buf = (unsigned char *) 0xc0000; if (buf[0]==0x55 && buf[1]==0xAA) { busdevfn = (dev->bus->secondary << 8) | dev->path.pci.devfn; - printk_debug("bus/devfn = %#x\n", busdevfn); + printk(BIOS_DEBUG, "bus/devfn = %#x\n", busdevfn); real_mode_switch_call_vga(busdevfn); } else - printk_debug("Failed to copy VGA BIOS to 0xc0000\n"); + printk(BIOS_DEBUG, "Failed to copy VGA BIOS to 0xc0000\n"); } else - printk_debug("BAD SIGNATURE 0x%x 0x%x\n", buf[0], buf[1]); + printk(BIOS_DEBUG, "BAD SIGNATURE 0x%x 0x%x\n", buf[0], buf[1]); pci_write_config32(dev, PCI_ROM_ADDRESS, 0); } @@ -562,28 +562,28 @@ int biosint(unsigned long intnumber, cs = cs_ip >> 16; flags = stackflags; - printk_debug("biosint: INT# 0x%lx\n", intnumber); - printk_debug("biosint: eax 0x%lx ebx 0x%lx ecx 0x%lx edx 0x%lx\n", + printk(BIOS_DEBUG, "biosint: INT# 0x%lx\n", intnumber); + printk(BIOS_DEBUG, "biosint: eax 0x%lx ebx 0x%lx ecx 0x%lx edx 0x%lx\n", eax, ebx, ecx, edx); - printk_debug("biosint: ebp 0x%lx esp 0x%lx edi 0x%lx esi 0x%lx\n", + printk(BIOS_DEBUG, "biosint: ebp 0x%lx esp 0x%lx edi 0x%lx esi 0x%lx\n", ebp, esp, edi, esi); - printk_debug("biosint: ip 0x%x cs 0x%x flags 0x%x\n", + printk(BIOS_DEBUG, "biosint: ip 0x%x cs 0x%x flags 0x%x\n", ip, cs, flags); // cases in a good compiler are just as good as your own tables. switch (intnumber) { case 0 ... 15: // These are not BIOS service, but the CPU-generated exceptions - printk_info("biosint: Oops, exception %u\n", intnumber); + printk(BIOS_INFO, "biosint: Oops, exception %u\n", intnumber); if (esp < 0x1000) { - printk_debug("Stack contents: "); + printk(BIOS_DEBUG, "Stack contents: "); while (esp < 0x1000) { - printk_debug("0x%04x ", *(unsigned short *) esp); + printk(BIOS_DEBUG, "0x%04x ", *(unsigned short *) esp); esp += 2; } - printk_debug("\n"); + printk(BIOS_DEBUG, "\n"); } - printk_debug("biosint: Bailing out\n"); + printk(BIOS_DEBUG, "biosint: Bailing out\n"); // "longjmp" vga_exit(); break; @@ -602,7 +602,7 @@ int biosint(unsigned long intnumber, &ebx, &edx, &ecx, &eax, &flags); break; default: - printk_info("BIOSINT: Unsupport int #0x%x\n", + printk(BIOS_INFO, "BIOSINT: Unsupport int #0x%x\n", intnumber); break; } @@ -728,7 +728,7 @@ pcibios(unsigned long *pedi, unsigned long *pesi, unsigned long *pebp, // devfn is an int, so we mask it off. busdevfn = (dev->bus->secondary << 8) | (dev->path.pci.devfn & 0xff); - printk_debug("0x%x: return 0x%x\n", func, busdevfn); + printk(BIOS_DEBUG, "0x%x: return 0x%x\n", func, busdevfn); *pebx = busdevfn; retval = 0; } else { @@ -754,7 +754,7 @@ pcibios(unsigned long *pedi, unsigned long *pesi, unsigned long *pebp, reg = *pedi; dev = dev_find_slot(bus, devfn); if (! dev) { - printk_debug("0x%x: BAD DEVICE bus %d devfn 0x%x\n", func, bus, devfn); + printk(BIOS_DEBUG, "0x%x: BAD DEVICE bus %d devfn 0x%x\n", func, bus, devfn); // idiots. the pcibios guys assumed you'd never pass a bad bus/devfn! *peax = PCIBIOS_BADREG; retval = -1; @@ -788,14 +788,14 @@ pcibios(unsigned long *pedi, unsigned long *pesi, unsigned long *pebp, if (retval) retval = PCIBIOS_BADREG; - printk_debug("0x%x: bus %d devfn 0x%x reg 0x%x val 0x%lx\n", + printk(BIOS_DEBUG, "0x%x: bus %d devfn 0x%x reg 0x%x val 0x%lx\n", func, bus, devfn, reg, *pecx); *peax = 0; retval = 0; } break; default: - printk_err("UNSUPPORTED PCIBIOS FUNCTION 0x%x\n", func); + printk(BIOS_ERR, "UNSUPPORTED PCIBIOS FUNCTION 0x%x\n", func); break; } diff --git a/src/northbridge/via/cn400/vlink.c b/src/northbridge/via/cn400/vlink.c index 1542af71fe..dc574c130d 100644 --- a/src/northbridge/via/cn400/vlink.c +++ b/src/northbridge/via/cn400/vlink.c @@ -43,7 +43,7 @@ static void vlink_init(device_t dev) u8 reg, reg8; int i, j; - printk_spew("Entering CN400 %s\n", __func__); + printk(BIOS_SPEW, "Entering CN400 %s\n", __func__); /* Disconnect the VLink Before Changing Settings */ reg = pci_read_config8(dev, 0x47); @@ -107,17 +107,17 @@ static void vlink_init(device_t dev) reg &= ~0x04; pci_write_config8(dev, 0x47, reg); - printk_spew("%s PCI Header Regs::\n", dev_path(dev)); + printk(BIOS_SPEW, "%s PCI Header Regs::\n", dev_path(dev)); for (i = 0 ; i < 16; i++) { - printk_spew("%02X: ", i*16); + printk(BIOS_SPEW, "%02X: ", i*16); for (j = 0; j < 16; j++) { reg8 = pci_read_config8(dev, j+(i*16)); - printk_spew("%02X ", reg8); + printk(BIOS_SPEW, "%02X ", reg8); } - printk_spew("\n"); + printk(BIOS_SPEW, "\n"); } #endif } @@ -141,19 +141,19 @@ static void c3_host_init(device_t dev) u8 reg8; int i, j; - printk_spew("Entering CN400 %s\n", __func__); + printk(BIOS_SPEW, "Entering CN400 %s\n", __func__); - printk_spew("%s PCI Header Regs::\n", dev_path(dev)); + printk(BIOS_SPEW, "%s PCI Header Regs::\n", dev_path(dev)); for (i = 0 ; i < 16; i++) { - printk_spew("%02X: ", i*16); + printk(BIOS_SPEW, "%02X: ", i*16); for (j = 0; j < 16; j++) { reg8 = pci_read_config8(dev, j+(i*16)); - printk_spew("%02X ", reg8); + printk(BIOS_SPEW, "%02X ", reg8); } - printk_spew("\n"); + printk(BIOS_SPEW, "\n"); } } @@ -178,19 +178,19 @@ static void c3_err_init(device_t dev) u8 reg8; int i, j; - printk_spew("Entering CN400 %s\n", __func__); + printk(BIOS_SPEW, "Entering CN400 %s\n", __func__); - printk_spew("%s PCI Header Regs::\n", dev_path(dev)); + printk(BIOS_SPEW, "%s PCI Header Regs::\n", dev_path(dev)); for (i = 0 ; i < 16; i++) { - printk_spew("%02X: ", i*16); + printk(BIOS_SPEW, "%02X: ", i*16); for (j = 0; j < 16; j++) { reg8 = pci_read_config8(dev, j+(i*16)); - printk_spew("%02X ", reg8); + printk(BIOS_SPEW, "%02X ", reg8); } - printk_spew("\n"); + printk(BIOS_SPEW, "\n"); } } @@ -214,19 +214,19 @@ static void cn400_pm_init(device_t dev) u8 reg8; int i, j; - printk_spew("Entering CN400 %s\n", __func__); + printk(BIOS_SPEW, "Entering CN400 %s\n", __func__); - printk_spew("%s PCI Header Regs::\n", dev_path(dev)); + printk(BIOS_SPEW, "%s PCI Header Regs::\n", dev_path(dev)); for (i = 0 ; i < 16; i++) { - printk_spew("%02X: ", i*16); + printk(BIOS_SPEW, "%02X: ", i*16); for (j = 0; j < 16; j++) { reg8 = pci_read_config8(dev, j+(i*16)); - printk_spew("%02X ", reg8); + printk(BIOS_SPEW, "%02X ", reg8); } - printk_spew("\n"); + printk(BIOS_SPEW, "\n"); } } |