diff options
Diffstat (limited to 'drivers/ide/mips/au1xxx-ide.c')
-rw-r--r-- | drivers/ide/mips/au1xxx-ide.c | 37 |
1 files changed, 13 insertions, 24 deletions
diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c index cd42b30a7a3b..0f4bf5d72835 100644 --- a/drivers/ide/mips/au1xxx-ide.c +++ b/drivers/ide/mips/au1xxx-ide.c | |||
@@ -548,6 +548,17 @@ static void auide_setup_ports(hw_regs_t *hw, _auide_hwif *ahwif) | |||
548 | *ata_regs = ahwif->regbase + (14 << AU1XXX_ATA_REG_OFFSET); | 548 | *ata_regs = ahwif->regbase + (14 << AU1XXX_ATA_REG_OFFSET); |
549 | } | 549 | } |
550 | 550 | ||
551 | static const struct ide_port_info au1xxx_port_info = { | ||
552 | .host_flags = IDE_HFLAG_POST_SET_MODE | | ||
553 | IDE_HFLAG_NO_DMA | /* no SFF-style DMA */ | ||
554 | IDE_HFLAG_NO_IO_32BIT | | ||
555 | IDE_HFLAG_UNMASK_IRQS, | ||
556 | .pio_mask = ATA_PIO4, | ||
557 | #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA | ||
558 | .mwdma_mask = ATA_MWDMA2, | ||
559 | #endif | ||
560 | }; | ||
561 | |||
551 | static int au_ide_probe(struct device *dev) | 562 | static int au_ide_probe(struct device *dev) |
552 | { | 563 | { |
553 | struct platform_device *pdev = to_platform_device(dev); | 564 | struct platform_device *pdev = to_platform_device(dev); |
@@ -606,21 +617,6 @@ static int au_ide_probe(struct device *dev) | |||
606 | 617 | ||
607 | hwif->dev = dev; | 618 | hwif->dev = dev; |
608 | 619 | ||
609 | hwif->ultra_mask = 0x0; /* Disable Ultra DMA */ | ||
610 | #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA | ||
611 | hwif->mwdma_mask = 0x07; /* Multimode-2 DMA */ | ||
612 | hwif->swdma_mask = 0x00; | ||
613 | #else | ||
614 | hwif->mwdma_mask = 0x0; | ||
615 | hwif->swdma_mask = 0x0; | ||
616 | #endif | ||
617 | |||
618 | hwif->pio_mask = ATA_PIO4; | ||
619 | hwif->host_flags = IDE_HFLAG_POST_SET_MODE; | ||
620 | |||
621 | hwif->drives[0].unmask = 1; | ||
622 | hwif->drives[1].unmask = 1; | ||
623 | |||
624 | /* hold should be on in all cases */ | 620 | /* hold should be on in all cases */ |
625 | hwif->hold = 1; | 621 | hwif->hold = 1; |
626 | 622 | ||
@@ -651,16 +647,9 @@ static int au_ide_probe(struct device *dev) | |||
651 | hwif->ide_dma_test_irq = &auide_dma_test_irq; | 647 | hwif->ide_dma_test_irq = &auide_dma_test_irq; |
652 | hwif->dma_lost_irq = &auide_dma_lost_irq; | 648 | hwif->dma_lost_irq = &auide_dma_lost_irq; |
653 | #endif | 649 | #endif |
654 | hwif->channel = 0; | ||
655 | hwif->select_data = 0; /* no chipset-specific code */ | 650 | hwif->select_data = 0; /* no chipset-specific code */ |
656 | hwif->config_data = 0; /* no chipset-specific code */ | 651 | hwif->config_data = 0; /* no chipset-specific code */ |
657 | 652 | ||
658 | hwif->drives[0].autotune = 1; /* 1=autotune, 2=noautotune, 0=default */ | ||
659 | hwif->drives[1].autotune = 1; | ||
660 | |||
661 | hwif->drives[0].no_io_32bit = 1; | ||
662 | hwif->drives[1].no_io_32bit = 1; | ||
663 | |||
664 | auide_hwif.hwif = hwif; | 653 | auide_hwif.hwif = hwif; |
665 | hwif->hwif_data = &auide_hwif; | 654 | hwif->hwif_data = &auide_hwif; |
666 | 655 | ||
@@ -671,7 +660,7 @@ static int au_ide_probe(struct device *dev) | |||
671 | 660 | ||
672 | idx[0] = hwif->index; | 661 | idx[0] = hwif->index; |
673 | 662 | ||
674 | ide_device_add(idx); | 663 | ide_device_add(idx, &au1xxx_port_info); |
675 | 664 | ||
676 | dev_set_drvdata(dev, hwif); | 665 | dev_set_drvdata(dev, hwif); |
677 | 666 | ||
@@ -688,7 +677,7 @@ static int au_ide_remove(struct device *dev) | |||
688 | ide_hwif_t *hwif = dev_get_drvdata(dev); | 677 | ide_hwif_t *hwif = dev_get_drvdata(dev); |
689 | _auide_hwif *ahwif = &auide_hwif; | 678 | _auide_hwif *ahwif = &auide_hwif; |
690 | 679 | ||
691 | ide_unregister(hwif->index); | 680 | ide_unregister(hwif->index, 0, 0); |
692 | 681 | ||
693 | iounmap((void *)ahwif->regbase); | 682 | iounmap((void *)ahwif->regbase); |
694 | 683 | ||