aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/hpt366.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-24 16:53:32 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-24 16:53:32 -0400
commitced3ec8aa7d0fa3300187ee47c144a22ccfc974e (patch)
treeea48651fe1b372685020cd67ac133240829c1576 /drivers/ide/pci/hpt366.c
parent04ba6e739e9c0623c25f94b191fd20dfbd1b26e3 (diff)
ide: prefix messages from IDE PCI host drivers by driver name
Prefix messages from IDE PCI host drivers by driver name instead of marketed chipset name (it is still possible to exactly identify the particular chipset basing on driver messages). As a bonus this provides nice code savings for some drivers: text data bss dec hex filename 3826 112 8 3946 f6a drivers/ide/pci/amd74xx.o.before 2786 112 8 2906 b5a drivers/ide/pci/amd74xx.o.after 764 108 0 872 368 drivers/ide/pci/cs5520.o.before 680 108 0 788 314 drivers/ide/pci/cs5520.o.after 1680 112 4 1796 704 drivers/ide/pci/generic.o.before 1155 112 4 1271 4f7 drivers/ide/pci/generic.o.after 7128 792 0 7920 1ef0 drivers/ide/pci/hpt366.o.before 6984 792 0 7776 1e60 drivers/ide/pci/hpt366.o.after 2800 148 0 2948 b84 drivers/ide/pci/pdc202xx_new.o.before 2523 148 0 2671 a6f drivers/ide/pci/pdc202xx_new.o.after 2831 148 0 2979 ba3 drivers/ide/pci/pdc202xx_old.o.before 2683 148 0 2831 b0f drivers/ide/pci/pdc202xx_old.o.after 3776 112 4 3892 f34 drivers/ide/pci/piix.o.before 2804 112 4 2920 b68 drivers/ide/pci/piix.o.after 4693 116 0 4809 12c9 drivers/ide/pci/siimage.o.before 4600 116 0 4716 126c drivers/ide/pci/siimage.o.after Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/hpt366.c')
-rw-r--r--drivers/ide/pci/hpt366.c65
1 files changed, 12 insertions, 53 deletions
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c
index b8004c331edb..6a1c65c3be3e 100644
--- a/drivers/ide/pci/hpt366.c
+++ b/drivers/ide/pci/hpt366.c
@@ -131,6 +131,8 @@
131#include <asm/uaccess.h> 131#include <asm/uaccess.h>
132#include <asm/io.h> 132#include <asm/io.h>
133 133
134#define DRV_NAME "hpt366"
135
134/* various tuning parameters */ 136/* various tuning parameters */
135#define HPT_RESET_STATE_ENGINE 137#define HPT_RESET_STATE_ENGINE
136#undef HPT_DELAY_INTERRUPT 138#undef HPT_DELAY_INTERRUPT
@@ -1362,7 +1364,7 @@ static void __devinit hpt374_init(struct pci_dev *dev, struct pci_dev *dev2)
1362 if (dev2->irq != dev->irq) { 1364 if (dev2->irq != dev->irq) {
1363 /* FIXME: we need a core pci_set_interrupt() */ 1365 /* FIXME: we need a core pci_set_interrupt() */
1364 dev2->irq = dev->irq; 1366 dev2->irq = dev->irq;
1365 printk(KERN_INFO "HPT374 %s: PCI config space interrupt " 1367 printk(KERN_INFO DRV_NAME " %s: PCI config space interrupt "
1366 "fixed\n", pci_name(dev2)); 1368 "fixed\n", pci_name(dev2));
1367 } 1369 }
1368} 1370}
@@ -1398,7 +1400,7 @@ static int __devinit hpt36x_init(struct pci_dev *dev, struct pci_dev *dev2)
1398 pci_read_config_byte(dev2, PCI_INTERRUPT_PIN, &pin2); 1400 pci_read_config_byte(dev2, PCI_INTERRUPT_PIN, &pin2);
1399 1401
1400 if (pin1 != pin2 && dev->irq == dev2->irq) { 1402 if (pin1 != pin2 && dev->irq == dev2->irq) {
1401 printk(KERN_INFO "HPT36x %s: onboard version of chipset, " 1403 printk(KERN_INFO DRV_NAME " %s: onboard version of chipset, "
1402 "pin1=%d pin2=%d\n", pci_name(dev), pin1, pin2); 1404 "pin1=%d pin2=%d\n", pci_name(dev), pin1, pin2);
1403 return 1; 1405 return 1;
1404 } 1406 }
@@ -1454,8 +1456,8 @@ static const struct ide_dma_ops hpt36x_dma_ops = {
1454}; 1456};
1455 1457
1456static const struct ide_port_info hpt366_chipsets[] __devinitdata = { 1458static const struct ide_port_info hpt366_chipsets[] __devinitdata = {
1457 { /* 0 */ 1459 { /* 0: HPT36x */
1458 .name = "HPT36x", 1460 .name = DRV_NAME,
1459 .init_chipset = init_chipset_hpt366, 1461 .init_chipset = init_chipset_hpt366,
1460 .init_hwif = init_hwif_hpt366, 1462 .init_hwif = init_hwif_hpt366,
1461 .init_dma = init_dma_hpt366, 1463 .init_dma = init_dma_hpt366,
@@ -1471,53 +1473,9 @@ static const struct ide_port_info hpt366_chipsets[] __devinitdata = {
1471 .host_flags = IDE_HFLAGS_HPT3XX | IDE_HFLAG_SINGLE, 1473 .host_flags = IDE_HFLAGS_HPT3XX | IDE_HFLAG_SINGLE,
1472 .pio_mask = ATA_PIO4, 1474 .pio_mask = ATA_PIO4,
1473 .mwdma_mask = ATA_MWDMA2, 1475 .mwdma_mask = ATA_MWDMA2,
1474 },{ /* 1 */ 1476 },
1475 .name = "HPT372A", 1477 { /* 1: HPT3xx */
1476 .init_chipset = init_chipset_hpt366, 1478 .name = DRV_NAME,
1477 .init_hwif = init_hwif_hpt366,
1478 .init_dma = init_dma_hpt366,
1479 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
1480 .port_ops = &hpt3xx_port_ops,
1481 .dma_ops = &hpt37x_dma_ops,
1482 .host_flags = IDE_HFLAGS_HPT3XX,
1483 .pio_mask = ATA_PIO4,
1484 .mwdma_mask = ATA_MWDMA2,
1485 },{ /* 2 */
1486 .name = "HPT302",
1487 .init_chipset = init_chipset_hpt366,
1488 .init_hwif = init_hwif_hpt366,
1489 .init_dma = init_dma_hpt366,
1490 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
1491 .port_ops = &hpt3xx_port_ops,
1492 .dma_ops = &hpt37x_dma_ops,
1493 .host_flags = IDE_HFLAGS_HPT3XX,
1494 .pio_mask = ATA_PIO4,
1495 .mwdma_mask = ATA_MWDMA2,
1496 },{ /* 3 */
1497 .name = "HPT371",
1498 .init_chipset = init_chipset_hpt366,
1499 .init_hwif = init_hwif_hpt366,
1500 .init_dma = init_dma_hpt366,
1501 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
1502 .port_ops = &hpt3xx_port_ops,
1503 .dma_ops = &hpt37x_dma_ops,
1504 .host_flags = IDE_HFLAGS_HPT3XX,
1505 .pio_mask = ATA_PIO4,
1506 .mwdma_mask = ATA_MWDMA2,
1507 },{ /* 4 */
1508 .name = "HPT374",
1509 .init_chipset = init_chipset_hpt366,
1510 .init_hwif = init_hwif_hpt366,
1511 .init_dma = init_dma_hpt366,
1512 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
1513 .udma_mask = ATA_UDMA5,
1514 .port_ops = &hpt3xx_port_ops,
1515 .dma_ops = &hpt37x_dma_ops,
1516 .host_flags = IDE_HFLAGS_HPT3XX,
1517 .pio_mask = ATA_PIO4,
1518 .mwdma_mask = ATA_MWDMA2,
1519 },{ /* 5 */
1520 .name = "HPT372N",
1521 .init_chipset = init_chipset_hpt366, 1479 .init_chipset = init_chipset_hpt366,
1522 .init_hwif = init_hwif_hpt366, 1480 .init_hwif = init_hwif_hpt366,
1523 .init_dma = init_dma_hpt366, 1481 .init_dma = init_dma_hpt366,
@@ -1583,9 +1541,10 @@ static int __devinit hpt366_init_one(struct pci_dev *dev, const struct pci_devic
1583 break; 1541 break;
1584 } 1542 }
1585 1543
1586 d = hpt366_chipsets[idx]; 1544 printk(KERN_INFO DRV_NAME ": %s chipset detected\n", info->chip_name);
1545
1546 d = hpt366_chipsets[min_t(u8, idx, 1)];
1587 1547
1588 d.name = info->chip_name;
1589 d.udma_mask = info->udma_mask; 1548 d.udma_mask = info->udma_mask;
1590 1549
1591 /* fixup ->dma_ops for HPT370/HPT370A */ 1550 /* fixup ->dma_ops for HPT370/HPT370A */