Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 19754
b: refs/heads/master
c: 16541c8
h: refs/heads/master
v: v3
  • Loading branch information
Kyle McMartin authored and Kyle McMartin committed Jan 23, 2006
1 parent 52ff9f1 commit 0ba5ea0
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 81a3de3efd61c2483a303cf0b6227525d2f28df7
refs/heads/master: 16541c8745e28f62b3dcb6cb354b73c9c01ea178
41 changes: 22 additions & 19 deletions trunk/drivers/parisc/superio.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ static struct superio_device sio_dev;
#define DBG_INIT(x...)
#endif

#define SUPERIO "SuperIO"
#define PFX SUPERIO ": "

static irqreturn_t
superio_interrupt(int parent_irq, void *devp, struct pt_regs *regs)
{
Expand Down Expand Up @@ -117,7 +120,7 @@ superio_interrupt(int parent_irq, void *devp, struct pt_regs *regs)
local_irq = results & 0x0f;

if (local_irq == 2 || local_irq > 7) {
printk(KERN_ERR "SuperIO: slave interrupted!\n");
printk(KERN_ERR PFX "slave interrupted!\n");
return IRQ_HANDLED;
}

Expand All @@ -128,7 +131,7 @@ superio_interrupt(int parent_irq, void *devp, struct pt_regs *regs)
outb(OCW3_ISR,IC_PIC1+0);
results = inb(IC_PIC1+0);
if ((results & 0x80) == 0) { /* if ISR7 not set: spurious */
printk(KERN_WARNING "SuperIO: spurious interrupt!\n");
printk(KERN_WARNING PFX "spurious interrupt!\n");
return IRQ_HANDLED;
}
}
Expand Down Expand Up @@ -163,27 +166,27 @@ superio_init(struct pci_dev *pcidev)
/* ...then properly fixup the USB to point at suckyio PIC */
sio->usb_pdev->irq = superio_fixup_irq(sio->usb_pdev);

printk(KERN_INFO "SuperIO: Found NS87560 Legacy I/O device at %s (IRQ %i) \n",
printk(KERN_INFO PFX "Found NS87560 Legacy I/O device at %s (IRQ %i) \n",
pci_name(pdev), pdev->irq);

pci_read_config_dword (pdev, SIO_SP1BAR, &sio->sp1_base);
sio->sp1_base &= ~1;
printk (KERN_INFO "SuperIO: Serial port 1 at 0x%x\n", sio->sp1_base);
printk(KERN_INFO PFX "Serial port 1 at 0x%x\n", sio->sp1_base);

pci_read_config_dword (pdev, SIO_SP2BAR, &sio->sp2_base);
sio->sp2_base &= ~1;
printk (KERN_INFO "SuperIO: Serial port 2 at 0x%x\n", sio->sp2_base);
printk(KERN_INFO PFX "Serial port 2 at 0x%x\n", sio->sp2_base);

pci_read_config_dword (pdev, SIO_PPBAR, &sio->pp_base);
sio->pp_base &= ~1;
printk (KERN_INFO "SuperIO: Parallel port at 0x%x\n", sio->pp_base);
printk(KERN_INFO PFX "Parallel port at 0x%x\n", sio->pp_base);

pci_read_config_dword (pdev, SIO_FDCBAR, &sio->fdc_base);
sio->fdc_base &= ~1;
printk (KERN_INFO "SuperIO: Floppy controller at 0x%x\n", sio->fdc_base);
printk(KERN_INFO PFX "Floppy controller at 0x%x\n", sio->fdc_base);
pci_read_config_dword (pdev, SIO_ACPIBAR, &sio->acpi_base);
sio->acpi_base &= ~1;
printk (KERN_INFO "SuperIO: ACPI at 0x%x\n", sio->acpi_base);
printk(KERN_INFO PFX "ACPI at 0x%x\n", sio->acpi_base);

request_region (IC_PIC1, 0x1f, "pic1");
request_region (IC_PIC2, 0x1f, "pic2");
Expand Down Expand Up @@ -263,14 +266,14 @@ superio_init(struct pci_dev *pcidev)
/* Setup USB power regulation */
outb(1, sio->acpi_base + USB_REG_CR);
if (inb(sio->acpi_base + USB_REG_CR) & 1)
printk(KERN_INFO "SuperIO: USB regulator enabled\n");
printk(KERN_INFO PFX "USB regulator enabled\n");
else
printk(KERN_ERR "USB regulator not initialized!\n");
printk(KERN_ERR PFX "USB regulator not initialized!\n");

if (request_irq(pdev->irq, superio_interrupt, SA_INTERRUPT,
"SuperIO", (void *)sio)) {
SUPERIO, (void *)sio)) {

printk(KERN_ERR "SuperIO: could not get irq\n");
printk(KERN_ERR PFX "could not get irq\n");
BUG();
return;
}
Expand All @@ -284,7 +287,7 @@ static void superio_disable_irq(unsigned int irq)
u8 r8;

if ((irq < 1) || (irq == 2) || (irq > 7)) {
printk(KERN_ERR "SuperIO: Illegal irq number.\n");
printk(KERN_ERR PFX "Illegal irq number.\n");
BUG();
return;
}
Expand All @@ -301,7 +304,7 @@ static void superio_enable_irq(unsigned int irq)
u8 r8;

if ((irq < 1) || (irq == 2) || (irq > 7)) {
printk(KERN_ERR "SuperIO: Illegal irq number (%d).\n", irq);
printk(KERN_ERR PFX "Illegal irq number (%d).\n", irq);
BUG();
return;
}
Expand All @@ -319,7 +322,7 @@ static unsigned int superio_startup_irq(unsigned int irq)
}

static struct hw_interrupt_type superio_interrupt_type = {
.typename = "SuperIO",
.typename = SUPERIO,
.startup = superio_startup_irq,
.shutdown = superio_disable_irq,
.enable = superio_enable_irq,
Expand Down Expand Up @@ -413,7 +416,7 @@ static void __devinit superio_serial_init(void)

retval = early_serial_setup(&serial[0]);
if (retval < 0) {
printk(KERN_WARNING "SuperIO: Register Serial #0 failed.\n");
printk(KERN_WARNING PFX "Register Serial #0 failed.\n");
return;
}

Expand All @@ -423,7 +426,7 @@ static void __devinit superio_serial_init(void)
retval = early_serial_setup(&serial[1]);

if (retval < 0)
printk(KERN_WARNING "SuperIO: Register Serial #1 failed.\n");
printk(KERN_WARNING PFX "Register Serial #1 failed.\n");
#endif /* CONFIG_SERIAL_8250 */
}

Expand All @@ -437,7 +440,7 @@ static void __devinit superio_parport_init(void)
PARPORT_DMA_NONE /* dma */,
NULL /*struct pci_dev* */) )

printk(KERN_WARNING "SuperIO: Probing parallel port failed.\n");
printk(KERN_WARNING PFX "Probing parallel port failed.\n");
#endif /* CONFIG_PARPORT_PC */
}

Expand Down Expand Up @@ -499,7 +502,7 @@ static struct pci_device_id superio_tbl[] = {
};

static struct pci_driver superio_driver = {
.name = "SuperIO",
.name = SUPERIO,
.id_table = superio_tbl,
.probe = superio_probe,
};
Expand Down

0 comments on commit 0ba5ea0

Please sign in to comment.