diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-19 18:32:30 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-19 18:32:30 -0400 |
commit | 8acf28c090f0e5e049f56b27bdd7cf1fb40c6b98 (patch) | |
tree | cbf910b986d423d030c5917515b3c68368aed70f /drivers/ide/pci/via82cxxx.c | |
parent | 528a572daea90aa41db92683e5a8756acef514c4 (diff) |
ide: add IDE_HFLAG_FORCE_LEGACY_IRQS host flag
Add IDE_HFLAG_FORCE_LEGACY_IRQS host flag to tell ide_pci_setup_ports()
to always set hwif->irq to legacy IRQ 14/15 and convert generic IDE PCI
and via82cxxx host drivers to use it.
While at it:
* Add IDE_HFLAGS_UMC define (generic IDE PCI host driver).
* Remove no longer needed init_hwif_generic() (generic IDE PCI host driver).
* Set d->udma_mask instead of hwif->ultra_mask (via82cxxx host driver).
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/via82cxxx.c')
-rw-r--r-- | drivers/ide/pci/via82cxxx.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c index c8022a92a0e3..27e5b410123a 100644 --- a/drivers/ide/pci/via82cxxx.c +++ b/drivers/ide/pci/via82cxxx.c | |||
@@ -428,12 +428,6 @@ static void __devinit init_hwif_via82cxxx(ide_hwif_t *hwif) | |||
428 | hwif->set_pio_mode = &via_set_pio_mode; | 428 | hwif->set_pio_mode = &via_set_pio_mode; |
429 | hwif->set_dma_mode = &via_set_drive; | 429 | hwif->set_dma_mode = &via_set_drive; |
430 | 430 | ||
431 | #ifdef CONFIG_PPC_CHRP | ||
432 | if(machine_is(chrp) && _chrp_type == _CHRP_Pegasos) { | ||
433 | hwif->irq = hwif->channel ? 15 : 14; | ||
434 | } | ||
435 | #endif | ||
436 | |||
437 | for (i = 0; i < 2; i++) { | 431 | for (i = 0; i < 2; i++) { |
438 | hwif->drives[i].io_32bit = 1; | 432 | hwif->drives[i].io_32bit = 1; |
439 | hwif->drives[i].unmask = (vdev->via_config->flags & VIA_NO_UNMASK) ? 0 : 1; | 433 | hwif->drives[i].unmask = (vdev->via_config->flags & VIA_NO_UNMASK) ? 0 : 1; |
@@ -442,8 +436,6 @@ static void __devinit init_hwif_via82cxxx(ide_hwif_t *hwif) | |||
442 | if (!hwif->dma_base) | 436 | if (!hwif->dma_base) |
443 | return; | 437 | return; |
444 | 438 | ||
445 | hwif->ultra_mask = vdev->via_config->udma_mask; | ||
446 | |||
447 | if (hwif->cbl != ATA_CBL_PATA40_SHORT) | 439 | if (hwif->cbl != ATA_CBL_PATA40_SHORT) |
448 | hwif->cbl = via82cxxx_cable_detect(hwif); | 440 | hwif->cbl = via82cxxx_cable_detect(hwif); |
449 | } | 441 | } |
@@ -479,8 +471,10 @@ static ide_pci_device_t via82cxxx_chipsets[] __devinitdata = { | |||
479 | 471 | ||
480 | static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 472 | static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
481 | { | 473 | { |
474 | ide_pci_device_t *d = &via82cxxx_chipsets[id->driver_data]; | ||
482 | struct pci_dev *isa = NULL; | 475 | struct pci_dev *isa = NULL; |
483 | struct via_isa_bridge *via_config; | 476 | struct via_isa_bridge *via_config; |
477 | |||
484 | /* | 478 | /* |
485 | * Find the ISA bridge and check we know what it is. | 479 | * Find the ISA bridge and check we know what it is. |
486 | */ | 480 | */ |
@@ -490,7 +484,15 @@ static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_i | |||
490 | printk(KERN_WARNING "VP_IDE: Unknown VIA SouthBridge, disabling DMA.\n"); | 484 | printk(KERN_WARNING "VP_IDE: Unknown VIA SouthBridge, disabling DMA.\n"); |
491 | return -ENODEV; | 485 | return -ENODEV; |
492 | } | 486 | } |
493 | return ide_setup_pci_device(dev, &via82cxxx_chipsets[id->driver_data]); | 487 | |
488 | #ifdef CONFIG_PPC_CHRP | ||
489 | if (machine_is(chrp) && _chrp_type == _CHRP_Pegasos) | ||
490 | d->host_flags |= IDE_HFLAG_FORCE_LEGACY_IRQS; | ||
491 | #endif | ||
492 | |||
493 | d->udma_mask = via_config->udma_mask; | ||
494 | |||
495 | return ide_setup_pci_device(dev, d); | ||
494 | } | 496 | } |
495 | 497 | ||
496 | static const struct pci_device_id via_pci_tbl[] = { | 498 | static const struct pci_device_id via_pci_tbl[] = { |