aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/mips/au1xxx-ide.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/mips/au1xxx-ide.c')
-rw-r--r--drivers/ide/mips/au1xxx-ide.c36
1 files changed, 8 insertions, 28 deletions
diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c
index a4d0d4ca73d0..2d3e5115b834 100644
--- a/drivers/ide/mips/au1xxx-ide.c
+++ b/drivers/ide/mips/au1xxx-ide.c
@@ -395,26 +395,10 @@ static int auide_dma_test_irq(ide_drive_t *drive)
395 return 0; 395 return 0;
396} 396}
397 397
398static void auide_dma_host_on(ide_drive_t *drive) 398static void auide_dma_host_set(ide_drive_t *drive, int on)
399{ 399{
400} 400}
401 401
402static int auide_dma_on(ide_drive_t *drive)
403{
404 drive->using_dma = 1;
405
406 return 0;
407}
408
409static void auide_dma_host_off(ide_drive_t *drive)
410{
411}
412
413static void auide_dma_off_quietly(ide_drive_t *drive)
414{
415 drive->using_dma = 0;
416}
417
418static void auide_dma_lost_irq(ide_drive_t *drive) 402static void auide_dma_lost_irq(ide_drive_t *drive)
419{ 403{
420 printk(KERN_ERR "%s: IRQ lost\n", drive->name); 404 printk(KERN_ERR "%s: IRQ lost\n", drive->name);
@@ -641,12 +625,13 @@ static int au_ide_probe(struct device *dev)
641 /* FIXME: This might possibly break PCMCIA IDE devices */ 625 /* FIXME: This might possibly break PCMCIA IDE devices */
642 626
643 hwif = &ide_hwifs[pdev->id]; 627 hwif = &ide_hwifs[pdev->id];
644 hwif->irq = ahwif->irq;
645 hwif->chipset = ide_au1xxx;
646 628
647 memset(&hw, 0, sizeof(hw)); 629 memset(&hw, 0, sizeof(hw));
648 auide_setup_ports(&hw, ahwif); 630 auide_setup_ports(&hw, ahwif);
649 memcpy(hwif->io_ports, hw.io_ports, sizeof(hwif->io_ports)); 631 hw.irq = ahwif->irq;
632 hw.chipset = ide_au1xxx;
633
634 ide_init_port_hw(hwif, &hw);
650 635
651 hwif->ultra_mask = 0x0; /* Disable Ultra DMA */ 636 hwif->ultra_mask = 0x0; /* Disable Ultra DMA */
652#ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA 637#ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA
@@ -660,7 +645,6 @@ static int au_ide_probe(struct device *dev)
660 hwif->pio_mask = ATA_PIO4; 645 hwif->pio_mask = ATA_PIO4;
661 hwif->host_flags = IDE_HFLAG_POST_SET_MODE; 646 hwif->host_flags = IDE_HFLAG_POST_SET_MODE;
662 647
663 hwif->noprobe = 0;
664 hwif->drives[0].unmask = 1; 648 hwif->drives[0].unmask = 1;
665 hwif->drives[1].unmask = 1; 649 hwif->drives[1].unmask = 1;
666 650
@@ -682,29 +666,25 @@ static int au_ide_probe(struct device *dev)
682 hwif->set_dma_mode = &auide_set_dma_mode; 666 hwif->set_dma_mode = &auide_set_dma_mode;
683 667
684#ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA 668#ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA
685 hwif->dma_off_quietly = &auide_dma_off_quietly;
686 hwif->dma_timeout = &auide_dma_timeout; 669 hwif->dma_timeout = &auide_dma_timeout;
687 670
688 hwif->mdma_filter = &auide_mdma_filter; 671 hwif->mdma_filter = &auide_mdma_filter;
689 672
673 hwif->dma_host_set = &auide_dma_host_set;
690 hwif->dma_exec_cmd = &auide_dma_exec_cmd; 674 hwif->dma_exec_cmd = &auide_dma_exec_cmd;
691 hwif->dma_start = &auide_dma_start; 675 hwif->dma_start = &auide_dma_start;
692 hwif->ide_dma_end = &auide_dma_end; 676 hwif->ide_dma_end = &auide_dma_end;
693 hwif->dma_setup = &auide_dma_setup; 677 hwif->dma_setup = &auide_dma_setup;
694 hwif->ide_dma_test_irq = &auide_dma_test_irq; 678 hwif->ide_dma_test_irq = &auide_dma_test_irq;
695 hwif->dma_host_off = &auide_dma_host_off;
696 hwif->dma_host_on = &auide_dma_host_on;
697 hwif->dma_lost_irq = &auide_dma_lost_irq; 679 hwif->dma_lost_irq = &auide_dma_lost_irq;
698 hwif->ide_dma_on = &auide_dma_on; 680#endif
699#else /* !CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA */
700 hwif->channel = 0; 681 hwif->channel = 0;
701 hwif->hold = 1;
702 hwif->select_data = 0; /* no chipset-specific code */ 682 hwif->select_data = 0; /* no chipset-specific code */
703 hwif->config_data = 0; /* no chipset-specific code */ 683 hwif->config_data = 0; /* no chipset-specific code */
704 684
705 hwif->drives[0].autotune = 1; /* 1=autotune, 2=noautotune, 0=default */ 685 hwif->drives[0].autotune = 1; /* 1=autotune, 2=noautotune, 0=default */
706 hwif->drives[1].autotune = 1; 686 hwif->drives[1].autotune = 1;
707#endif 687
708 hwif->drives[0].no_io_32bit = 1; 688 hwif->drives[0].no_io_32bit = 1;
709 hwif->drives[1].no_io_32bit = 1; 689 hwif->drives[1].no_io_32bit = 1;
710 690