aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/alim15x3.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/alim15x3.c')
-rw-r--r--drivers/ide/pci/alim15x3.c32
1 files changed, 11 insertions, 21 deletions
diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c
index 5261f308d94..987db35199e 100644
--- a/drivers/ide/pci/alim15x3.c
+++ b/drivers/ide/pci/alim15x3.c
@@ -652,21 +652,7 @@ static u8 __devinit ali_cable_detect(ide_hwif_t *hwif)
652 return cbl; 652 return cbl;
653} 653}
654 654
655/** 655#ifndef CONFIG_SPARC64
656 * init_hwif_common_ali15x3 - Set up ALI IDE hardware
657 * @hwif: IDE interface
658 *
659 * Initialize the IDE structure side of the ALi 15x3 driver.
660 */
661
662static void __devinit init_hwif_common_ali15x3 (ide_hwif_t *hwif)
663{
664 if (hwif->dma_base == 0)
665 return;
666
667 hwif->dma_setup = &ali15x3_dma_setup;
668}
669
670/** 656/**
671 * init_hwif_ali15x3 - Initialize the ALI IDE x86 stuff 657 * init_hwif_ali15x3 - Initialize the ALI IDE x86 stuff
672 * @hwif: interface to configure 658 * @hwif: interface to configure
@@ -716,9 +702,8 @@ static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif)
716 if(irq >= 0) 702 if(irq >= 0)
717 hwif->irq = irq; 703 hwif->irq = irq;
718 } 704 }
719
720 init_hwif_common_ali15x3(hwif);
721} 705}
706#endif
722 707
723/** 708/**
724 * init_dma_ali15x3 - set up DMA on ALi15x3 709 * init_dma_ali15x3 - set up DMA on ALi15x3
@@ -746,7 +731,7 @@ static int __devinit init_dma_ali15x3(ide_hwif_t *hwif,
746 if (ide_allocate_dma_engine(hwif)) 731 if (ide_allocate_dma_engine(hwif))
747 return -1; 732 return -1;
748 733
749 ide_setup_dma(hwif, base); 734 ide_setup_dma(hwif, base, d);
750 735
751 return 0; 736 return 0;
752} 737}
@@ -758,10 +743,16 @@ static const struct ide_port_ops ali_port_ops = {
758 .cable_detect = ali_cable_detect, 743 .cable_detect = ali_cable_detect,
759}; 744};
760 745
746static struct ide_dma_ops ali_dma_ops = {
747 .dma_setup = ali15x3_dma_setup,
748};
749
761static const struct ide_port_info ali15x3_chipset __devinitdata = { 750static const struct ide_port_info ali15x3_chipset __devinitdata = {
762 .name = "ALI15X3", 751 .name = "ALI15X3",
763 .init_chipset = init_chipset_ali15x3, 752 .init_chipset = init_chipset_ali15x3,
753#ifndef CONFIG_SPARC64
764 .init_hwif = init_hwif_ali15x3, 754 .init_hwif = init_hwif_ali15x3,
755#endif
765 .init_dma = init_dma_ali15x3, 756 .init_dma = init_dma_ali15x3,
766 .port_ops = &ali_port_ops, 757 .port_ops = &ali_port_ops,
767 .pio_mask = ATA_PIO5, 758 .pio_mask = ATA_PIO5,
@@ -806,6 +797,8 @@ static int __devinit alim15x3_init_one(struct pci_dev *dev, const struct pci_dev
806 d.udma_mask = ATA_UDMA5; 797 d.udma_mask = ATA_UDMA5;
807 else 798 else
808 d.udma_mask = ATA_UDMA6; 799 d.udma_mask = ATA_UDMA6;
800
801 d.dma_ops = &ali_dma_ops;
809 } else { 802 } else {
810 d.host_flags |= IDE_HFLAG_NO_DMA; 803 d.host_flags |= IDE_HFLAG_NO_DMA;
811 804
@@ -815,9 +808,6 @@ static int __devinit alim15x3_init_one(struct pci_dev *dev, const struct pci_dev
815 if (idx == 0) 808 if (idx == 0)
816 d.host_flags |= IDE_HFLAG_CLEAR_SIMPLEX; 809 d.host_flags |= IDE_HFLAG_CLEAR_SIMPLEX;
817 810
818#if defined(CONFIG_SPARC64)
819 d.init_hwif = init_hwif_common_ali15x3;
820#endif /* CONFIG_SPARC64 */
821 return ide_setup_pci_device(dev, &d); 811 return ide_setup_pci_device(dev, &d);
822} 812}
823 813