diff options
Diffstat (limited to 'drivers/ide/pci/sgiioc4.c')
-rw-r--r-- | drivers/ide/pci/sgiioc4.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c index c292e1de1d56..85ffaaa39b1b 100644 --- a/drivers/ide/pci/sgiioc4.c +++ b/drivers/ide/pci/sgiioc4.c | |||
@@ -291,12 +291,8 @@ static void sgiioc4_dma_off_quietly(ide_drive_t *drive) | |||
291 | drive->hwif->dma_host_off(drive); | 291 | drive->hwif->dma_host_off(drive); |
292 | } | 292 | } |
293 | 293 | ||
294 | static int sgiioc4_speedproc(ide_drive_t *drive, const u8 speed) | 294 | static void sgiioc4_set_dma_mode(ide_drive_t *drive, const u8 speed) |
295 | { | 295 | { |
296 | if (speed != XFER_MW_DMA_2) | ||
297 | return 1; | ||
298 | |||
299 | return ide_config_drive_speed(drive, speed); | ||
300 | } | 296 | } |
301 | 297 | ||
302 | static int sgiioc4_ide_dma_check(ide_drive_t *drive) | 298 | static int sgiioc4_ide_dma_check(ide_drive_t *drive) |
@@ -591,11 +587,9 @@ static void __devinit | |||
591 | ide_init_sgiioc4(ide_hwif_t * hwif) | 587 | ide_init_sgiioc4(ide_hwif_t * hwif) |
592 | { | 588 | { |
593 | hwif->mmio = 1; | 589 | hwif->mmio = 1; |
594 | hwif->atapi_dma = 1; | ||
595 | hwif->mwdma_mask = 0x04; | ||
596 | hwif->pio_mask = 0x00; | 590 | hwif->pio_mask = 0x00; |
597 | hwif->set_pio_mode = NULL; /* Sets timing for PIO mode */ | 591 | hwif->set_pio_mode = NULL; /* Sets timing for PIO mode */ |
598 | hwif->speedproc = &sgiioc4_speedproc; | 592 | hwif->set_dma_mode = &sgiioc4_set_dma_mode; |
599 | hwif->selectproc = NULL;/* Use the default routine to select drive */ | 593 | hwif->selectproc = NULL;/* Use the default routine to select drive */ |
600 | hwif->reset_poll = NULL;/* No HBA specific reset_poll needed */ | 594 | hwif->reset_poll = NULL;/* No HBA specific reset_poll needed */ |
601 | hwif->pre_reset = NULL; /* No HBA specific pre_set needed */ | 595 | hwif->pre_reset = NULL; /* No HBA specific pre_set needed */ |
@@ -606,6 +600,14 @@ ide_init_sgiioc4(ide_hwif_t * hwif) | |||
606 | hwif->quirkproc = NULL; | 600 | hwif->quirkproc = NULL; |
607 | hwif->busproc = NULL; | 601 | hwif->busproc = NULL; |
608 | 602 | ||
603 | hwif->INB = &sgiioc4_INB; | ||
604 | |||
605 | if (hwif->dma_base == 0) | ||
606 | return; | ||
607 | |||
608 | hwif->atapi_dma = 1; | ||
609 | hwif->mwdma_mask = 0x04; | ||
610 | |||
609 | hwif->dma_setup = &sgiioc4_ide_dma_setup; | 611 | hwif->dma_setup = &sgiioc4_ide_dma_setup; |
610 | hwif->dma_start = &sgiioc4_ide_dma_start; | 612 | hwif->dma_start = &sgiioc4_ide_dma_start; |
611 | hwif->ide_dma_end = &sgiioc4_ide_dma_end; | 613 | hwif->ide_dma_end = &sgiioc4_ide_dma_end; |
@@ -617,8 +619,6 @@ ide_init_sgiioc4(ide_hwif_t * hwif) | |||
617 | hwif->dma_host_off = &sgiioc4_dma_host_off; | 619 | hwif->dma_host_off = &sgiioc4_dma_host_off; |
618 | hwif->dma_lost_irq = &sgiioc4_dma_lost_irq; | 620 | hwif->dma_lost_irq = &sgiioc4_dma_lost_irq; |
619 | hwif->dma_timeout = &ide_dma_timeout; | 621 | hwif->dma_timeout = &ide_dma_timeout; |
620 | |||
621 | hwif->INB = &sgiioc4_INB; | ||
622 | } | 622 | } |
623 | 623 | ||
624 | static int __devinit | 624 | static int __devinit |
@@ -688,8 +688,6 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev) | |||
688 | /* Initializing chipset IRQ Registers */ | 688 | /* Initializing chipset IRQ Registers */ |
689 | writel(0x03, (void __iomem *)(irqport + IOC4_INTR_SET * 4)); | 689 | writel(0x03, (void __iomem *)(irqport + IOC4_INTR_SET * 4)); |
690 | 690 | ||
691 | ide_init_sgiioc4(hwif); | ||
692 | |||
693 | hwif->autodma = 0; | 691 | hwif->autodma = 0; |
694 | 692 | ||
695 | if (dma_base && ide_dma_sgiioc4(hwif, dma_base) == 0) { | 693 | if (dma_base && ide_dma_sgiioc4(hwif, dma_base) == 0) { |
@@ -699,6 +697,8 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev) | |||
699 | printk(KERN_INFO "%s: %s Bus-Master DMA disabled\n", | 697 | printk(KERN_INFO "%s: %s Bus-Master DMA disabled\n", |
700 | hwif->name, DRV_NAME); | 698 | hwif->name, DRV_NAME); |
701 | 699 | ||
700 | ide_init_sgiioc4(hwif); | ||
701 | |||
702 | if (probe_hwif_init(hwif)) | 702 | if (probe_hwif_init(hwif)) |
703 | return -EIO; | 703 | return -EIO; |
704 | 704 | ||