aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/piix.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/piix.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/piix.c')
-rw-r--r--drivers/ide/pci/piix.c106
1 files changed, 47 insertions, 59 deletions
diff --git a/drivers/ide/pci/piix.c b/drivers/ide/pci/piix.c
index c16b1ab4d4ff..9eb411f5c358 100644
--- a/drivers/ide/pci/piix.c
+++ b/drivers/ide/pci/piix.c
@@ -54,6 +54,8 @@
54 54
55#include <asm/io.h> 55#include <asm/io.h>
56 56
57#define DRV_NAME "piix"
58
57static int no_piix_dma; 59static int no_piix_dma;
58 60
59/** 61/**
@@ -314,9 +316,9 @@ static const struct ide_port_ops piix_port_ops = {
314 #define IDE_HFLAGS_PIIX 0 316 #define IDE_HFLAGS_PIIX 0
315#endif 317#endif
316 318
317#define DECLARE_PIIX_DEV(name_str, udma) \ 319#define DECLARE_PIIX_DEV(udma) \
318 { \ 320 { \
319 .name = name_str, \ 321 .name = DRV_NAME, \
320 .init_hwif = init_hwif_piix, \ 322 .init_hwif = init_hwif_piix, \
321 .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, \ 323 .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, \
322 .port_ops = &piix_port_ops, \ 324 .port_ops = &piix_port_ops, \
@@ -327,9 +329,9 @@ static const struct ide_port_ops piix_port_ops = {
327 .udma_mask = udma, \ 329 .udma_mask = udma, \
328 } 330 }
329 331
330#define DECLARE_ICH_DEV(name_str, udma) \ 332#define DECLARE_ICH_DEV(udma) \
331 { \ 333 { \
332 .name = name_str, \ 334 .name = DRV_NAME, \
333 .init_chipset = init_chipset_ich, \ 335 .init_chipset = init_chipset_ich, \
334 .init_hwif = init_hwif_ich, \ 336 .init_hwif = init_hwif_ich, \
335 .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, \ 337 .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, \
@@ -342,45 +344,31 @@ static const struct ide_port_ops piix_port_ops = {
342 } 344 }
343 345
344static const struct ide_port_info piix_pci_info[] __devinitdata = { 346static const struct ide_port_info piix_pci_info[] __devinitdata = {
345 /* 0 */ DECLARE_PIIX_DEV("PIIXa", 0x00), /* no udma */ 347 /* 0: MPIIX */
346 /* 1 */ DECLARE_PIIX_DEV("PIIXb", 0x00), /* no udma */
347
348 /* 2 */
349 { /* 348 { /*
350 * MPIIX actually has only a single IDE channel mapped to 349 * MPIIX actually has only a single IDE channel mapped to
351 * the primary or secondary ports depending on the value 350 * the primary or secondary ports depending on the value
352 * of the bit 14 of the IDETIM register at offset 0x6c 351 * of the bit 14 of the IDETIM register at offset 0x6c
353 */ 352 */
354 .name = "MPIIX", 353 .name = DRV_NAME,
355 .enablebits = {{0x6d,0xc0,0x80}, {0x6d,0xc0,0xc0}}, 354 .enablebits = {{0x6d,0xc0,0x80}, {0x6d,0xc0,0xc0}},
356 .host_flags = IDE_HFLAG_ISA_PORTS | IDE_HFLAG_NO_DMA | 355 .host_flags = IDE_HFLAG_ISA_PORTS | IDE_HFLAG_NO_DMA |
357 IDE_HFLAGS_PIIX, 356 IDE_HFLAGS_PIIX,
358 .pio_mask = ATA_PIO4, 357 .pio_mask = ATA_PIO4,
359 /* This is a painful system best to let it self tune for now */ 358 /* This is a painful system best to let it self tune for now */
360 }, 359 },
361 360 /* 1: PIIXa/PIIXb/PIIX3 */
362 /* 3 */ DECLARE_PIIX_DEV("PIIX3", 0x00), /* no udma */ 361 DECLARE_PIIX_DEV(0x00), /* no udma */
363 /* 4 */ DECLARE_PIIX_DEV("PIIX4", ATA_UDMA2), 362 /* 2: PIIX4 */
364 /* 5 */ DECLARE_ICH_DEV("ICH0", ATA_UDMA2), 363 DECLARE_PIIX_DEV(ATA_UDMA2),
365 /* 6 */ DECLARE_PIIX_DEV("PIIX4", ATA_UDMA2), 364 /* 3: ICH0 */
366 /* 7 */ DECLARE_ICH_DEV("ICH", ATA_UDMA4), 365 DECLARE_ICH_DEV(ATA_UDMA2),
367 /* 8 */ DECLARE_PIIX_DEV("PIIX4", ATA_UDMA4), 366 /* 4: ICH */
368 /* 9 */ DECLARE_PIIX_DEV("PIIX4", ATA_UDMA2), 367 DECLARE_ICH_DEV(ATA_UDMA4),
369 /* 10 */ DECLARE_ICH_DEV("ICH2", ATA_UDMA5), 368 /* 5: PIIX4 */
370 /* 11 */ DECLARE_ICH_DEV("ICH2M", ATA_UDMA5), 369 DECLARE_PIIX_DEV(ATA_UDMA4),
371 /* 12 */ DECLARE_ICH_DEV("ICH3M", ATA_UDMA5), 370 /* 6: ICH[2-7]/ICH[2-3]M/C-ICH/ICH5-SATA/ESB2/ICH8M */
372 /* 13 */ DECLARE_ICH_DEV("ICH3", ATA_UDMA5), 371 DECLARE_ICH_DEV(ATA_UDMA5),
373 /* 14 */ DECLARE_ICH_DEV("ICH4", ATA_UDMA5),
374 /* 15 */ DECLARE_ICH_DEV("ICH5", ATA_UDMA5),
375 /* 16 */ DECLARE_ICH_DEV("C-ICH", ATA_UDMA5),
376 /* 17 */ DECLARE_ICH_DEV("ICH4", ATA_UDMA5),
377 /* 18 */ DECLARE_ICH_DEV("ICH5-SATA", ATA_UDMA5),
378 /* 19 */ DECLARE_ICH_DEV("ICH5", ATA_UDMA5),
379 /* 20 */ DECLARE_ICH_DEV("ICH6", ATA_UDMA5),
380 /* 21 */ DECLARE_ICH_DEV("ICH7", ATA_UDMA5),
381 /* 22 */ DECLARE_ICH_DEV("ICH4", ATA_UDMA5),
382 /* 23 */ DECLARE_ICH_DEV("ESB2", ATA_UDMA5),
383 /* 24 */ DECLARE_ICH_DEV("ICH8M", ATA_UDMA5),
384}; 372};
385 373
386/** 374/**
@@ -421,39 +409,39 @@ static void __devinit piix_check_450nx(void)
421 no_piix_dma = 2; 409 no_piix_dma = 2;
422 } 410 }
423 if(no_piix_dma) 411 if(no_piix_dma)
424 printk(KERN_WARNING "piix: 450NX errata present, disabling IDE DMA.\n"); 412 printk(KERN_WARNING DRV_NAME ": 450NX errata present, disabling IDE DMA.\n");
425 if(no_piix_dma == 2) 413 if(no_piix_dma == 2)
426 printk(KERN_WARNING "piix: A BIOS update may resolve this.\n"); 414 printk(KERN_WARNING DRV_NAME ": A BIOS update may resolve this.\n");
427} 415}
428 416
429static const struct pci_device_id piix_pci_tbl[] = { 417static const struct pci_device_id piix_pci_tbl[] = {
430 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82371FB_0), 0 }, 418 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82371FB_0), 1 },
431 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82371FB_1), 1 }, 419 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82371FB_1), 1 },
432 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82371MX), 2 }, 420 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82371MX), 0 },
433 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82371SB_1), 3 }, 421 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82371SB_1), 1 },
434 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82371AB), 4 }, 422 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82371AB), 2 },
435 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82801AB_1), 5 }, 423 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82801AB_1), 3 },
436 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82443MX_1), 6 }, 424 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82443MX_1), 2 },
437 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82801AA_1), 7 }, 425 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82801AA_1), 4 },
438 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82372FB_1), 8 }, 426 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82372FB_1), 5 },
439 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82451NX), 9 }, 427 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82451NX), 2 },
440 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82801BA_9), 10 }, 428 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82801BA_9), 6 },
441 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82801BA_8), 11 }, 429 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82801BA_8), 6 },
442 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82801CA_10), 12 }, 430 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82801CA_10), 6 },
443 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82801CA_11), 13 }, 431 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82801CA_11), 6 },
444 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82801DB_11), 14 }, 432 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82801DB_11), 6 },
445 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82801EB_11), 15 }, 433 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82801EB_11), 6 },
446 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82801E_11), 16 }, 434 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82801E_11), 6 },
447 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82801DB_10), 17 }, 435 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82801DB_10), 6 },
448#ifdef CONFIG_BLK_DEV_IDE_SATA 436#ifdef CONFIG_BLK_DEV_IDE_SATA
449 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82801EB_1), 18 }, 437 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82801EB_1), 6 },
450#endif 438#endif
451 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ESB_2), 19 }, 439 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ESB_2), 6 },
452 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ICH6_19), 20 }, 440 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ICH6_19), 6 },
453 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ICH7_21), 21 }, 441 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ICH7_21), 6 },
454 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82801DB_1), 22 }, 442 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82801DB_1), 6 },
455 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ESB2_18), 23 }, 443 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ESB2_18), 6 },
456 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ICH8_6), 24 }, 444 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ICH8_6), 6 },
457 { 0, }, 445 { 0, },
458}; 446};
459MODULE_DEVICE_TABLE(pci, piix_pci_tbl); 447MODULE_DEVICE_TABLE(pci, piix_pci_tbl);