aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax/bkm_a8.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-10-31 03:42:07 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-04-20 18:22:31 -0400
commit8349304d12cf1313bdbd6eb2083701d86809be24 (patch)
tree599d43c202cda35b80966d9f364559484ca4145a /drivers/isdn/hisax/bkm_a8.c
parentd38c8475b4f3a684ac673dcedc88ffdb17b74882 (diff)
[ISDN] Hisax: eliminate many unnecessary references to CardType[]
For the vast majority of CardType[card->typ] uses (but not all!), the string is constant for each driver. Therefore, we may replace CardType[card->typ] with the actual string describing the driver, making each printk() a bit more simple. This also has the nice, intended side effect of greatly reducing external references to hisax global CardType[]. This will be of value once the ISDN drivers are converted to the ISA/PCI/PNP hotplug APIs. Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/isdn/hisax/bkm_a8.c')
-rw-r--r--drivers/isdn/hisax/bkm_a8.c31
1 files changed, 13 insertions, 18 deletions
diff --git a/drivers/isdn/hisax/bkm_a8.c b/drivers/isdn/hisax/bkm_a8.c
index 99ef3b43fcd7..e1ff4717a8a6 100644
--- a/drivers/isdn/hisax/bkm_a8.c
+++ b/drivers/isdn/hisax/bkm_a8.c
@@ -22,8 +22,6 @@
22 22
23#define ATTEMPT_PCI_REMAPPING /* Required for PLX rev 1 */ 23#define ATTEMPT_PCI_REMAPPING /* Required for PLX rev 1 */
24 24
25extern const char *CardType[];
26
27static const char sct_quadro_revision[] = "$Revision: 1.22.2.4 $"; 25static const char sct_quadro_revision[] = "$Revision: 1.22.2.4 $";
28 26
29static const char *sct_quadro_subtypes[] = 27static const char *sct_quadro_subtypes[] =
@@ -181,8 +179,7 @@ bkm_interrupt_ipac(int intno, void *dev_id)
181 goto Start_IPAC; 179 goto Start_IPAC;
182 } 180 }
183 if (!icnt) 181 if (!icnt)
184 printk(KERN_WARNING "HiSax: %s (%s) IRQ LOOP\n", 182 printk(KERN_WARNING "HiSax: Scitel Quadro (%s) IRQ LOOP\n",
185 CardType[cs->typ],
186 sct_quadro_subtypes[cs->subtyp]); 183 sct_quadro_subtypes[cs->subtyp]);
187 writereg(cs->hw.ax.base, cs->hw.ax.data_adr, IPAC_MASK, 0xFF); 184 writereg(cs->hw.ax.base, cs->hw.ax.data_adr, IPAC_MASK, 0xFF);
188 writereg(cs->hw.ax.base, cs->hw.ax.data_adr, IPAC_MASK, 0xC0); 185 writereg(cs->hw.ax.base, cs->hw.ax.data_adr, IPAC_MASK, 0xC0);
@@ -296,8 +293,8 @@ setup_sct_quadro(struct IsdnCard *card)
296 if (card->para[0] >= SCT_1 && card->para[0] <= SCT_4) 293 if (card->para[0] >= SCT_1 && card->para[0] <= SCT_4)
297 cs->subtyp = card->para[0]; 294 cs->subtyp = card->para[0];
298 else { 295 else {
299 printk(KERN_WARNING "HiSax: %s: Invalid subcontroller in configuration, default to 1\n", 296 printk(KERN_WARNING "HiSax: Scitel Quadro: Invalid "
300 CardType[card->typ]); 297 "subcontroller in configuration, default to 1\n");
301 return (0); 298 return (0);
302 } 299 }
303 if ((cs->subtyp != SCT_1) && ((sub_sys_id != PCI_DEVICE_ID_BERKOM_SCITEL_QUADRO) || 300 if ((cs->subtyp != SCT_1) && ((sub_sys_id != PCI_DEVICE_ID_BERKOM_SCITEL_QUADRO) ||
@@ -322,16 +319,16 @@ setup_sct_quadro(struct IsdnCard *card)
322 } 319 }
323 } 320 }
324 if (!found) { 321 if (!found) {
325 printk(KERN_WARNING "HiSax: %s (%s): Card not found\n", 322 printk(KERN_WARNING "HiSax: Scitel Quadro (%s): "
326 CardType[card->typ], 323 "Card not found\n",
327 sct_quadro_subtypes[cs->subtyp]); 324 sct_quadro_subtypes[cs->subtyp]);
328 return (0); 325 return (0);
329 } 326 }
330#ifdef ATTEMPT_PCI_REMAPPING 327#ifdef ATTEMPT_PCI_REMAPPING
331/* HACK: PLX revision 1 bug: PLX address bit 7 must not be set */ 328/* HACK: PLX revision 1 bug: PLX address bit 7 must not be set */
332 if ((pci_ioaddr1 & 0x80) && (dev_a8->revision == 1)) { 329 if ((pci_ioaddr1 & 0x80) && (dev_a8->revision == 1)) {
333 printk(KERN_WARNING "HiSax: %s (%s): PLX rev 1, remapping required!\n", 330 printk(KERN_WARNING "HiSax: Scitel Quadro (%s): "
334 CardType[card->typ], 331 "PLX rev 1, remapping required!\n",
335 sct_quadro_subtypes[cs->subtyp]); 332 sct_quadro_subtypes[cs->subtyp]);
336 /* Restart PCI negotiation */ 333 /* Restart PCI negotiation */
337 pci_write_config_dword(dev_a8, PCI_BASE_ADDRESS_1, (u_int) - 1); 334 pci_write_config_dword(dev_a8, PCI_BASE_ADDRESS_1, (u_int) - 1);
@@ -344,8 +341,7 @@ setup_sct_quadro(struct IsdnCard *card)
344#endif /* End HACK */ 341#endif /* End HACK */
345 } 342 }
346 if (!pci_irq) { /* IRQ range check ?? */ 343 if (!pci_irq) { /* IRQ range check ?? */
347 printk(KERN_WARNING "HiSax: %s (%s): No IRQ\n", 344 printk(KERN_WARNING "HiSax: Scitel Quadro (%s): No IRQ\n",
348 CardType[card->typ],
349 sct_quadro_subtypes[cs->subtyp]); 345 sct_quadro_subtypes[cs->subtyp]);
350 return (0); 346 return (0);
351 } 347 }
@@ -355,8 +351,8 @@ setup_sct_quadro(struct IsdnCard *card)
355 pci_read_config_dword(dev_a8, PCI_BASE_ADDRESS_4, &pci_ioaddr4); 351 pci_read_config_dword(dev_a8, PCI_BASE_ADDRESS_4, &pci_ioaddr4);
356 pci_read_config_dword(dev_a8, PCI_BASE_ADDRESS_5, &pci_ioaddr5); 352 pci_read_config_dword(dev_a8, PCI_BASE_ADDRESS_5, &pci_ioaddr5);
357 if (!pci_ioaddr1 || !pci_ioaddr2 || !pci_ioaddr3 || !pci_ioaddr4 || !pci_ioaddr5) { 353 if (!pci_ioaddr1 || !pci_ioaddr2 || !pci_ioaddr3 || !pci_ioaddr4 || !pci_ioaddr5) {
358 printk(KERN_WARNING "HiSax: %s (%s): No IO base address(es)\n", 354 printk(KERN_WARNING "HiSax: Scitel Quadro (%s): "
359 CardType[card->typ], 355 "No IO base address(es)\n",
360 sct_quadro_subtypes[cs->subtyp]); 356 sct_quadro_subtypes[cs->subtyp]);
361 return (0); 357 return (0);
362 } 358 }
@@ -411,8 +407,8 @@ setup_sct_quadro(struct IsdnCard *card)
411 /* For isac and hscx data path */ 407 /* For isac and hscx data path */
412 cs->hw.ax.data_adr = cs->hw.ax.base + 4; 408 cs->hw.ax.data_adr = cs->hw.ax.base + 4;
413 409
414 printk(KERN_INFO "HiSax: %s (%s) configured at 0x%.4lX, 0x%.4lX, 0x%.4lX and IRQ %d\n", 410 printk(KERN_INFO "HiSax: Scitel Quadro (%s) configured at "
415 CardType[card->typ], 411 "0x%.4lX, 0x%.4lX, 0x%.4lX and IRQ %d\n",
416 sct_quadro_subtypes[cs->subtyp], 412 sct_quadro_subtypes[cs->subtyp],
417 cs->hw.ax.plx_adr, 413 cs->hw.ax.plx_adr,
418 cs->hw.ax.base, 414 cs->hw.ax.base,
@@ -432,8 +428,7 @@ setup_sct_quadro(struct IsdnCard *card)
432 cs->cardmsg = &BKM_card_msg; 428 cs->cardmsg = &BKM_card_msg;
433 cs->irq_func = &bkm_interrupt_ipac; 429 cs->irq_func = &bkm_interrupt_ipac;
434 430
435 printk(KERN_INFO "HiSax: %s (%s): IPAC Version %d\n", 431 printk(KERN_INFO "HiSax: Scitel Quadro (%s): IPAC Version %d\n",
436 CardType[card->typ],
437 sct_quadro_subtypes[cs->subtyp], 432 sct_quadro_subtypes[cs->subtyp],
438 readreg(cs->hw.ax.base, cs->hw.ax.data_adr, IPAC_ID)); 433 readreg(cs->hw.ax.base, cs->hw.ax.data_adr, IPAC_ID));
439 return (1); 434 return (1);