aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/piix.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-18 18:30:11 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-18 18:30:11 -0400
commit3985ee3b4c5f9e1d73623b92715375b089c54353 (patch)
tree13741edc5575b3ebb436f94b04e338b3b0701e9f /drivers/ide/pci/piix.c
parent1c51361a9867021dd7444b56d87834003d4ca67d (diff)
ide: add IDE_HFLAG_LEGACY_IRQS host flag
Add IDE_HFLAG_LEGACY_IRQS host flag to tell ide_pci_setup_ports() to set hwif->irq to legacy IRQ 14/15 (iff hwif->irq is not already set) and convert atiixp, piix, serverworks, sis5513 and slc90e66 host drivers to use it. While at it: * In piix.c add IDE_HFLAGS_PIIX define and don't use ->init_hwif for MPIIX. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/piix.c')
-rw-r--r--drivers/ide/pci/piix.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/drivers/ide/pci/piix.c b/drivers/ide/pci/piix.c
index bcdf8c17b90b..2e29543acff9 100644
--- a/drivers/ide/pci/piix.c
+++ b/drivers/ide/pci/piix.c
@@ -341,16 +341,6 @@ static u8 __devinit piix_cable_detect(ide_hwif_t *hwif)
341 341
342static void __devinit init_hwif_piix(ide_hwif_t *hwif) 342static void __devinit init_hwif_piix(ide_hwif_t *hwif)
343{ 343{
344#ifndef CONFIG_IA64
345 if (!hwif->irq)
346 hwif->irq = hwif->channel ? 15 : 14;
347#endif /* CONFIG_IA64 */
348
349 if (hwif->pci_dev->device == PCI_DEVICE_ID_INTEL_82371MX) {
350 /* This is a painful system best to let it self tune for now */
351 return;
352 }
353
354 hwif->set_pio_mode = &piix_set_pio_mode; 344 hwif->set_pio_mode = &piix_set_pio_mode;
355 hwif->set_dma_mode = &piix_set_dma_mode; 345 hwif->set_dma_mode = &piix_set_dma_mode;
356 346
@@ -378,12 +368,18 @@ static void __devinit init_hwif_ich(ide_hwif_t *hwif)
378 hwif->ide_dma_clear_irq = &piix_dma_clear_irq; 368 hwif->ide_dma_clear_irq = &piix_dma_clear_irq;
379} 369}
380 370
371#ifndef CONFIG_IA64
372 #define IDE_HFLAGS_PIIX (IDE_HFLAG_LEGACY_IRQS | IDE_HFLAG_BOOTABLE)
373#else
374 #define IDE_HFLAGS_PIIX IDE_HFLAG_BOOTABLE
375#endif
376
381#define DECLARE_PIIX_DEV(name_str, udma) \ 377#define DECLARE_PIIX_DEV(name_str, udma) \
382 { \ 378 { \
383 .name = name_str, \ 379 .name = name_str, \
384 .init_hwif = init_hwif_piix, \ 380 .init_hwif = init_hwif_piix, \
385 .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, \ 381 .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, \
386 .host_flags = IDE_HFLAG_BOOTABLE, \ 382 .host_flags = IDE_HFLAGS_PIIX, \
387 .pio_mask = ATA_PIO4, \ 383 .pio_mask = ATA_PIO4, \
388 .swdma_mask = ATA_SWDMA2_ONLY, \ 384 .swdma_mask = ATA_SWDMA2_ONLY, \
389 .mwdma_mask = ATA_MWDMA12_ONLY, \ 385 .mwdma_mask = ATA_MWDMA12_ONLY, \
@@ -396,7 +392,7 @@ static void __devinit init_hwif_ich(ide_hwif_t *hwif)
396 .init_chipset = init_chipset_ich, \ 392 .init_chipset = init_chipset_ich, \
397 .init_hwif = init_hwif_ich, \ 393 .init_hwif = init_hwif_ich, \
398 .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, \ 394 .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, \
399 .host_flags = IDE_HFLAG_BOOTABLE, \ 395 .host_flags = IDE_HFLAGS_PIIX, \
400 .pio_mask = ATA_PIO4, \ 396 .pio_mask = ATA_PIO4, \
401 .swdma_mask = ATA_SWDMA2_ONLY, \ 397 .swdma_mask = ATA_SWDMA2_ONLY, \
402 .mwdma_mask = ATA_MWDMA12_ONLY, \ 398 .mwdma_mask = ATA_MWDMA12_ONLY, \
@@ -414,11 +410,11 @@ static ide_pci_device_t piix_pci_info[] __devinitdata = {
414 * of the bit 14 of the IDETIM register at offset 0x6c 410 * of the bit 14 of the IDETIM register at offset 0x6c
415 */ 411 */
416 .name = "MPIIX", 412 .name = "MPIIX",
417 .init_hwif = init_hwif_piix,
418 .enablebits = {{0x6d,0xc0,0x80}, {0x6d,0xc0,0xc0}}, 413 .enablebits = {{0x6d,0xc0,0x80}, {0x6d,0xc0,0xc0}},
419 .host_flags = IDE_HFLAG_ISA_PORTS | IDE_HFLAG_NO_DMA | 414 .host_flags = IDE_HFLAG_ISA_PORTS | IDE_HFLAG_NO_DMA |
420 IDE_HFLAG_BOOTABLE, 415 IDE_HFLAGS_PIIX,
421 .pio_mask = ATA_PIO4, 416 .pio_mask = ATA_PIO4,
417 /* This is a painful system best to let it self tune for now */
422 }, 418 },
423 419
424 /* 3 */ DECLARE_PIIX_DEV("PIIX3", 0x00), /* no udma */ 420 /* 3 */ DECLARE_PIIX_DEV("PIIX3", 0x00), /* no udma */