aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/parisc/superio.c41
1 files changed, 22 insertions, 19 deletions
diff --git a/drivers/parisc/superio.c b/drivers/parisc/superio.c
index d14888e149bb..ba971fecd0d8 100644
--- a/drivers/parisc/superio.c
+++ b/drivers/parisc/superio.c
@@ -89,6 +89,9 @@ static struct superio_device sio_dev;
89#define DBG_INIT(x...) 89#define DBG_INIT(x...)
90#endif 90#endif
91 91
92#define SUPERIO "SuperIO"
93#define PFX SUPERIO ": "
94
92static irqreturn_t 95static irqreturn_t
93superio_interrupt(int parent_irq, void *devp, struct pt_regs *regs) 96superio_interrupt(int parent_irq, void *devp, struct pt_regs *regs)
94{ 97{
@@ -117,7 +120,7 @@ superio_interrupt(int parent_irq, void *devp, struct pt_regs *regs)
117 local_irq = results & 0x0f; 120 local_irq = results & 0x0f;
118 121
119 if (local_irq == 2 || local_irq > 7) { 122 if (local_irq == 2 || local_irq > 7) {
120 printk(KERN_ERR "SuperIO: slave interrupted!\n"); 123 printk(KERN_ERR PFX "slave interrupted!\n");
121 return IRQ_HANDLED; 124 return IRQ_HANDLED;
122 } 125 }
123 126
@@ -128,7 +131,7 @@ superio_interrupt(int parent_irq, void *devp, struct pt_regs *regs)
128 outb(OCW3_ISR,IC_PIC1+0); 131 outb(OCW3_ISR,IC_PIC1+0);
129 results = inb(IC_PIC1+0); 132 results = inb(IC_PIC1+0);
130 if ((results & 0x80) == 0) { /* if ISR7 not set: spurious */ 133 if ((results & 0x80) == 0) { /* if ISR7 not set: spurious */
131 printk(KERN_WARNING "SuperIO: spurious interrupt!\n"); 134 printk(KERN_WARNING PFX "spurious interrupt!\n");
132 return IRQ_HANDLED; 135 return IRQ_HANDLED;
133 } 136 }
134 } 137 }
@@ -163,27 +166,27 @@ superio_init(struct pci_dev *pcidev)
163 /* ...then properly fixup the USB to point at suckyio PIC */ 166 /* ...then properly fixup the USB to point at suckyio PIC */
164 sio->usb_pdev->irq = superio_fixup_irq(sio->usb_pdev); 167 sio->usb_pdev->irq = superio_fixup_irq(sio->usb_pdev);
165 168
166 printk(KERN_INFO "SuperIO: Found NS87560 Legacy I/O device at %s (IRQ %i) \n", 169 printk(KERN_INFO PFX "Found NS87560 Legacy I/O device at %s (IRQ %i) \n",
167 pci_name(pdev), pdev->irq); 170 pci_name(pdev), pdev->irq);
168 171
169 pci_read_config_dword (pdev, SIO_SP1BAR, &sio->sp1_base); 172 pci_read_config_dword (pdev, SIO_SP1BAR, &sio->sp1_base);
170 sio->sp1_base &= ~1; 173 sio->sp1_base &= ~1;
171 printk (KERN_INFO "SuperIO: Serial port 1 at 0x%x\n", sio->sp1_base); 174 printk(KERN_INFO PFX "Serial port 1 at 0x%x\n", sio->sp1_base);
172 175
173 pci_read_config_dword (pdev, SIO_SP2BAR, &sio->sp2_base); 176 pci_read_config_dword (pdev, SIO_SP2BAR, &sio->sp2_base);
174 sio->sp2_base &= ~1; 177 sio->sp2_base &= ~1;
175 printk (KERN_INFO "SuperIO: Serial port 2 at 0x%x\n", sio->sp2_base); 178 printk(KERN_INFO PFX "Serial port 2 at 0x%x\n", sio->sp2_base);
176 179
177 pci_read_config_dword (pdev, SIO_PPBAR, &sio->pp_base); 180 pci_read_config_dword (pdev, SIO_PPBAR, &sio->pp_base);
178 sio->pp_base &= ~1; 181 sio->pp_base &= ~1;
179 printk (KERN_INFO "SuperIO: Parallel port at 0x%x\n", sio->pp_base); 182 printk(KERN_INFO PFX "Parallel port at 0x%x\n", sio->pp_base);
180 183
181 pci_read_config_dword (pdev, SIO_FDCBAR, &sio->fdc_base); 184 pci_read_config_dword (pdev, SIO_FDCBAR, &sio->fdc_base);
182 sio->fdc_base &= ~1; 185 sio->fdc_base &= ~1;
183 printk (KERN_INFO "SuperIO: Floppy controller at 0x%x\n", sio->fdc_base); 186 printk(KERN_INFO PFX "Floppy controller at 0x%x\n", sio->fdc_base);
184 pci_read_config_dword (pdev, SIO_ACPIBAR, &sio->acpi_base); 187 pci_read_config_dword (pdev, SIO_ACPIBAR, &sio->acpi_base);
185 sio->acpi_base &= ~1; 188 sio->acpi_base &= ~1;
186 printk (KERN_INFO "SuperIO: ACPI at 0x%x\n", sio->acpi_base); 189 printk(KERN_INFO PFX "ACPI at 0x%x\n", sio->acpi_base);
187 190
188 request_region (IC_PIC1, 0x1f, "pic1"); 191 request_region (IC_PIC1, 0x1f, "pic1");
189 request_region (IC_PIC2, 0x1f, "pic2"); 192 request_region (IC_PIC2, 0x1f, "pic2");
@@ -263,14 +266,14 @@ superio_init(struct pci_dev *pcidev)
263 /* Setup USB power regulation */ 266 /* Setup USB power regulation */
264 outb(1, sio->acpi_base + USB_REG_CR); 267 outb(1, sio->acpi_base + USB_REG_CR);
265 if (inb(sio->acpi_base + USB_REG_CR) & 1) 268 if (inb(sio->acpi_base + USB_REG_CR) & 1)
266 printk(KERN_INFO "SuperIO: USB regulator enabled\n"); 269 printk(KERN_INFO PFX "USB regulator enabled\n");
267 else 270 else
268 printk(KERN_ERR "USB regulator not initialized!\n"); 271 printk(KERN_ERR PFX "USB regulator not initialized!\n");
269 272
270 if (request_irq(pdev->irq, superio_interrupt, SA_INTERRUPT, 273 if (request_irq(pdev->irq, superio_interrupt, SA_INTERRUPT,
271 "SuperIO", (void *)sio)) { 274 SUPERIO, (void *)sio)) {
272 275
273 printk(KERN_ERR "SuperIO: could not get irq\n"); 276 printk(KERN_ERR PFX "could not get irq\n");
274 BUG(); 277 BUG();
275 return; 278 return;
276 } 279 }
@@ -284,7 +287,7 @@ static void superio_disable_irq(unsigned int irq)
284 u8 r8; 287 u8 r8;
285 288
286 if ((irq < 1) || (irq == 2) || (irq > 7)) { 289 if ((irq < 1) || (irq == 2) || (irq > 7)) {
287 printk(KERN_ERR "SuperIO: Illegal irq number.\n"); 290 printk(KERN_ERR PFX "Illegal irq number.\n");
288 BUG(); 291 BUG();
289 return; 292 return;
290 } 293 }
@@ -301,7 +304,7 @@ static void superio_enable_irq(unsigned int irq)
301 u8 r8; 304 u8 r8;
302 305
303 if ((irq < 1) || (irq == 2) || (irq > 7)) { 306 if ((irq < 1) || (irq == 2) || (irq > 7)) {
304 printk(KERN_ERR "SuperIO: Illegal irq number (%d).\n", irq); 307 printk(KERN_ERR PFX "Illegal irq number (%d).\n", irq);
305 BUG(); 308 BUG();
306 return; 309 return;
307 } 310 }
@@ -319,7 +322,7 @@ static unsigned int superio_startup_irq(unsigned int irq)
319} 322}
320 323
321static struct hw_interrupt_type superio_interrupt_type = { 324static struct hw_interrupt_type superio_interrupt_type = {
322 .typename = "SuperIO", 325 .typename = SUPERIO,
323 .startup = superio_startup_irq, 326 .startup = superio_startup_irq,
324 .shutdown = superio_disable_irq, 327 .shutdown = superio_disable_irq,
325 .enable = superio_enable_irq, 328 .enable = superio_enable_irq,
@@ -413,7 +416,7 @@ static void __devinit superio_serial_init(void)
413 416
414 retval = early_serial_setup(&serial[0]); 417 retval = early_serial_setup(&serial[0]);
415 if (retval < 0) { 418 if (retval < 0) {
416 printk(KERN_WARNING "SuperIO: Register Serial #0 failed.\n"); 419 printk(KERN_WARNING PFX "Register Serial #0 failed.\n");
417 return; 420 return;
418 } 421 }
419 422
@@ -423,7 +426,7 @@ static void __devinit superio_serial_init(void)
423 retval = early_serial_setup(&serial[1]); 426 retval = early_serial_setup(&serial[1]);
424 427
425 if (retval < 0) 428 if (retval < 0)
426 printk(KERN_WARNING "SuperIO: Register Serial #1 failed.\n"); 429 printk(KERN_WARNING PFX "Register Serial #1 failed.\n");
427#endif /* CONFIG_SERIAL_8250 */ 430#endif /* CONFIG_SERIAL_8250 */
428} 431}
429 432
@@ -437,7 +440,7 @@ static void __devinit superio_parport_init(void)
437 PARPORT_DMA_NONE /* dma */, 440 PARPORT_DMA_NONE /* dma */,
438 NULL /*struct pci_dev* */) ) 441 NULL /*struct pci_dev* */) )
439 442
440 printk(KERN_WARNING "SuperIO: Probing parallel port failed.\n"); 443 printk(KERN_WARNING PFX "Probing parallel port failed.\n");
441#endif /* CONFIG_PARPORT_PC */ 444#endif /* CONFIG_PARPORT_PC */
442} 445}
443 446
@@ -499,7 +502,7 @@ static struct pci_device_id superio_tbl[] = {
499}; 502};
500 503
501static struct pci_driver superio_driver = { 504static struct pci_driver superio_driver = {
502 .name = "SuperIO", 505 .name = SUPERIO,
503 .id_table = superio_tbl, 506 .id_table = superio_tbl,
504 .probe = superio_probe, 507 .probe = superio_probe,
505}; 508};