more clean up for printk messages

This commit is contained in:
Li-Ta Lo 2000-12-06 11:02:36 +00:00
parent 79ff9ed5cc
commit 54e665686e
7 changed files with 29 additions and 31 deletions

View file

@ -61,7 +61,7 @@ static void cache_disable(void)
unsigned int tmp; unsigned int tmp;
/* Disable cache */ /* Disable cache */
printk( KERN_INFO "Disable Cache\n"); DBG("Disable Cache\n");
/* Write back the cache and flush TLB */ /* Write back the cache and flush TLB */
asm volatile ("movl %%cr0, %0\n\t" asm volatile ("movl %%cr0, %0\n\t"
@ -81,7 +81,7 @@ static void cache_enable(void)
"movl %0, %%cr0\n\t" "movl %0, %%cr0\n\t"
:"=r" (tmp) : : "memory"); :"=r" (tmp) : : "memory");
printk( KERN_INFO "Enable Cache\n"); DBG("Enable Cache\n");
} }
// GOTO bad and GOTO done added by rgm. // GOTO bad and GOTO done added by rgm.

View file

@ -31,7 +31,6 @@ static char rcsid[] = "$Id$";
#include <cpu/p6/msr.h> #include <cpu/p6/msr.h>
#include <cpu/p6/mtrr.h> #include <cpu/p6/mtrr.h>
#define DEBUG
#include <printk.h> #include <printk.h>
#define arraysize(x) (sizeof(x)/sizeof((x)[0])) #define arraysize(x) (sizeof(x)/sizeof((x)[0]))

View file

@ -1494,6 +1494,7 @@ linuxbiosmain(unsigned long base, unsigned long totalram)
bytes_out = 0; bytes_out = 0;
output_ptr = 0; output_ptr = 0;
printk("\n");
printk("Welcome to start32, the open sourced starter.\n"); printk("Welcome to start32, the open sourced starter.\n");
printk("This space will eventually hold more diagnostic information.\n"); printk("This space will eventually hold more diagnostic information.\n");
printk("\n"); printk("\n");

View file

@ -103,14 +103,14 @@ void pci_set_master(struct pci_dev *dev)
pci_read_config_word(dev, PCI_COMMAND, &cmd); pci_read_config_word(dev, PCI_COMMAND, &cmd);
if (!(cmd & PCI_COMMAND_MASTER)) { if (!(cmd & PCI_COMMAND_MASTER)) {
printk("PCI: Enabling bus mastering for device %02x:%02x\n", DBG("PCI: Enabling bus mastering for device %02x:%02x\n",
dev->bus->number, dev->devfn); dev->bus->number, dev->devfn);
cmd |= PCI_COMMAND_MASTER; cmd |= PCI_COMMAND_MASTER;
pci_write_config_word(dev, PCI_COMMAND, cmd); pci_write_config_word(dev, PCI_COMMAND, cmd);
} }
pci_read_config_byte(dev, PCI_LATENCY_TIMER, &lat); pci_read_config_byte(dev, PCI_LATENCY_TIMER, &lat);
if (lat < 16) { if (lat < 16) {
printk("PCI: Increasing latency timer of device %02x:%02x to 64\n", DBG("PCI: Increasing latency timer of device %02x:%02x to 64\n",
dev->bus->number, dev->devfn); dev->bus->number, dev->devfn);
pci_write_config_byte(dev, PCI_LATENCY_TIMER, 64); pci_write_config_byte(dev, PCI_LATENCY_TIMER, 64);
} }
@ -180,7 +180,7 @@ void pci_read_bases(struct pci_dev *dev, unsigned int howmany)
#if BITS_PER_LONG == 64 #if BITS_PER_LONG == 64
dev->base_address[reg - 1] |= ((unsigned long) addr) << 32; dev->base_address[reg - 1] |= ((unsigned long) addr) << 32;
#else #else
printk("PCI: Unable to handle 64-bit address for device " printk(KERN_ERR "PCI: Unable to handle 64-bit address for device "
"%02x:%02x\n", dev->bus->number, dev->devfn); "%02x:%02x\n", dev->bus->number, dev->devfn);
dev->base_address[reg - 1] = 0; dev->base_address[reg - 1] = 0;
#endif #endif
@ -246,7 +246,7 @@ unsigned int pci_scan_bus(struct pci_bus *bus)
} }
if ((dev = kmalloc(sizeof(*dev), GFP_ATOMIC)) == 0) { if ((dev = kmalloc(sizeof(*dev), GFP_ATOMIC)) == 0) {
printk("PCI: out of memory.\n"); printk(KERN_ERR "PCI: out of memory.\n");
continue; continue;
} }
@ -291,8 +291,8 @@ unsigned int pci_scan_bus(struct pci_bus *bus)
break; break;
default: /* unknown header */ default: /* unknown header */
bad: bad:
printk("PCI: %02x:%02x [%04x/%04x/%06x] has unknown header type %02x, " printk(KERN_ERR "PCI: %02x:%02x [%04x/%04x/%06x] has unknown header "
"ignoring.\n", "type %02x, ignoring.\n",
bus->number, dev->devfn, dev->vendor, dev->device, class, bus->number, dev->devfn, dev->vendor, dev->device, class,
hdr_type); hdr_type);
continue; continue;
@ -373,7 +373,7 @@ unsigned int pci_scan_bus(struct pci_bus *bus)
#endif #endif
/* Insert it into the tree of buses. */ /* Insert it into the tree of buses. */
if ((child = kmalloc(sizeof(*child), GFP_ATOMIC)) == 0) { if ((child = kmalloc(sizeof(*child), GFP_ATOMIC)) == 0) {
printk("PCI: out of memory for bridge.\n"); printk(KERN_ERR "PCI: out of memory for bridge.\n");
continue; continue;
} }
memset(child, 0, sizeof(*child)); memset(child, 0, sizeof(*child));

View file

@ -11,10 +11,9 @@ final_mainboard_fixup(void)
void final_southbridge_fixup(void); void final_southbridge_fixup(void);
void final_superio_fixup(void); void final_superio_fixup(void);
printk(KERN_INFO
"Winfast 6300 (and similar)...");
final_southbridge_fixup(); final_southbridge_fixup();
final_superio_fixup(); final_superio_fixup();
printk(KERN_INFO
"Final mainboard fixup done for Winfast 6300 (and similar)\n");
} }

View file

@ -11,10 +11,9 @@ final_mainboard_fixup(void)
void final_southbridge_fixup(void); void final_southbridge_fixup(void);
void final_superio_fixup(void); void final_superio_fixup(void);
printk(KERN_INFO
"Matsonic MS7308E (and similar)");
final_southbridge_fixup(); final_southbridge_fixup();
final_superio_fixup(); final_superio_fixup();
printk(KERN_INFO
"Final mainboard fixup done for Winfast 6300 (and similar)\n");
} }

View file

@ -48,23 +48,23 @@ void nvram_on()
pci_write_config_byte(pcidev, 0x40, 0x33); pci_write_config_byte(pcidev, 0x40, 0x33);
/* Flash can be flashed */ /* Flash can be flashed */
pci_write_config_byte(pcidev, 0x45, 0x40); pci_write_config_byte(pcidev, 0x45, 0x40);
printk(KERN_INFO "Enabled in SIS 503 regs 0x40 and 0x45\n"); DBG("Enabled in SIS 503 regs 0x40 and 0x45\n");
} }
printk(KERN_INFO "Now try to turn off shadow\n"); DBG("Now try to turn off shadow\n");
#ifdef USE_DOC_MIL #ifdef USE_DOC_MIL
/* turn off nvram shadow in 0xc0000 ~ 0xfffff, i.e. accessing segment C - F /* turn off nvram shadow in 0xc0000 ~ 0xfffff, i.e. accessing segment C - F
is actually to the DRAM not NVRAM. For 512KB NVRAM case, this one should be is actually to the DRAM not NVRAM. For 512KB NVRAM case, this one should be
disabled */ disabled */
pcidev = pci_find_device(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_630, (void *)NULL); pcidev = pci_find_device(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_630, (void *)NULL);
printk(KERN_INFO "device for SiS 630 is 0x%x\n", pcidev); DBG("device for SiS 630 is 0x%x\n", pcidev);
if (pcidev != NULL) { if (pcidev != NULL) {
/* read cycle goes to System Memory */ /* read cycle goes to System Memory */
pci_write_config_word(pcidev, 0x70, 0x1fff); pci_write_config_word(pcidev, 0x70, 0x1fff);
/* write cycle goest to System Memory */ /* write cycle goest to System Memory */
pci_write_config_word(pcidev, 0x72, 0x1fff); pci_write_config_word(pcidev, 0x72, 0x1fff);
printk(KERN_INFO "Shadow memory disabled in SiS 630\n"); DBG("Shadow memory disabled in SiS 630\n");
} }
#endif #endif
@ -109,21 +109,21 @@ acpi_fixup(void)
// Set a base address for ACPI of 0xc000 // Set a base address for ACPI of 0xc000
pci_read_config_word(pcidev, 0x74, &temp); pci_read_config_word(pcidev, 0x74, &temp);
printk(KERN_INFO "acpibase was 0x%x\n", temp); DBG("acpibase was 0x%x\n", temp);
pci_write_config_word(pcidev, 0x74, acpibase); pci_write_config_word(pcidev, 0x74, acpibase);
pci_read_config_word(pcidev, 0x74, &temp); pci_read_config_word(pcidev, 0x74, &temp);
printk(KERN_INFO "acpibase is 0x%x\n", temp); DBG("acpibase is 0x%x\n", temp);
// now enable acpi // now enable acpi
pci_read_config_byte(pcidev, 0x40, &val); pci_read_config_byte(pcidev, 0x40, &val);
printk(KERN_INFO "acpi enable reg was 0x%x\n", val); DBG("acpi enable reg was 0x%x\n", val);
val |= 0x80; val |= 0x80;
pci_write_config_byte(pcidev, 0x40, val); pci_write_config_byte(pcidev, 0x40, val);
pci_read_config_byte(pcidev, 0x40, &val); pci_read_config_byte(pcidev, 0x40, &val);
printk(KERN_INFO "acpi enable reg after set is 0x%x\n", val); DBG("acpi enable reg after set is 0x%x\n", val);
printk(KERN_INFO "acpi status: word at 0x56 is 0x%x\n", DBG("acpi status: word at 0x56 is 0x%x\n",
inw(acpibase+0x56)); inw(acpibase+0x56));
printk(KERN_INFO "acpi status: byte at 0x4b is 0x%x\n", DBG("acpi status: byte at 0x4b is 0x%x\n",
inb(acpibase + 0x4b)); inb(acpibase + 0x4b));
// now that it's on, get in there and call off the dogs. // now that it's on, get in there and call off the dogs.
@ -133,12 +133,12 @@ acpi_fixup(void)
outb(0, acpibase + 0x4b); outb(0, acpibase + 0x4b);
// ah ha! have to SET, NOT CLEAR! // ah ha! have to SET, NOT CLEAR!
outb(0x40, acpibase + 0x56); outb(0x40, acpibase + 0x56);
printk(KERN_INFO "acpibase + 0x56 is 0x%x\n", DBG("acpibase + 0x56 is 0x%x\n",
inb(acpibase+0x56)); inb(acpibase+0x56));
val &= (~0x80); val &= (~0x80);
pci_write_config_byte(pcidev, 0x40, val); pci_write_config_byte(pcidev, 0x40, val);
pci_read_config_byte(pcidev, 0x40, &val); pci_read_config_byte(pcidev, 0x40, &val);
printk(KERN_INFO "acpi disable reg after set is 0x%x\n", val); DBG("acpi disable reg after set is 0x%x\n", val);
} else { } else {
printk(KERN_EMERG "Can't find south bridge!\n"); printk(KERN_EMERG "Can't find south bridge!\n");
} }
@ -177,5 +177,5 @@ final_southbridge_fixup()
serial_irq_fixedup(); serial_irq_fixedup();
acpi_fixup(); acpi_fixup();
printk(KERN_INFO "Southbridge fixup done for SIS 503\n"); DBG("Southbridge fixup done for SIS 503\n");
} }